The two major international airports in Portugal are situated in Lisboa(LIS) and Porto (OPO ).
To get from Lisbon to Coimbra you can take either a train or a bus. Trains leave from the railway station "Estação do Oriente". The price is 15 Euro for Intercidades and 20.50 Euro for Alfa Pendular (in touristic class). Please note that the last train is at 21:39. If your plane arrives later than that you can take a bus from Sete Rios at 00:15. It costs 13 Euro.
To get from Porto to Coimbra you can also take either a train or bus. Trains leave from the railway station "Estação de Campanhã". The price is 15 Euro for Alfa Pendular, 10.50 for Intercidades. There is an undeground connection between Porto Airport and "Estação de Campanhã"(the journey time is about 40 minutes). The last fast train from "Estação de Campanhã" to Coimbra is at 20:47. If you arrive later than that you can use either the bus at 00:45 or the regional train at 1:30 (not at Saturday -> Sunday night!).
The long distance trains arrive at the train station Coimbra B. To get to Hotel Astória you can use a connecting train to Coimbra A and then walk or you can get a taxi from Coimbra B. If you booked Residencial Botânico the most convenient way to get there from Coimbra B is by taxi.
Both hotels are in walking distance from Department of Mathematics.
View Coimbra in a larger map