Your requirements are very tight.
Bus is the only feasible option.
There are no buses direct from Porto Airport to Castelo Branco.
You will need to take the metro into Porto and then walk to the bus station. See this link on my blog for more information:
http://barlaventostravelblog.blogspot.com/2009/01/bus-from-porto-to-castelo-branco.html
There is a bus leaving the Porto Bus Station daily as follows:
Dept Porto: 16:30 Arr: Castelo Branco 21:10
Change bus in COIMBRA
There is a direct bus as follows:
Dept Porto: 18:15 Arr: Castelo Branco 22:55