Neither Granada nor Cordoba are directly accessible from Lisbon by public transport.
Apart from hiring a car which would be expensive, you best bet would be long distance bus.
Bus company www.alsa.es currently operates the following service between Lisbon Sete Rios Bus Station and Granada:
LISBOA GRANADA 09:00 22:45 Until 08/09/2009
LISBOA GRANADA 21:30 11:00 next day
Note this service involves a bus change en route. Spanish Time 1 hour ahead of Portuguese Time.
The same company operates at least 9 services a day between Granada and Cordoba with a transit time of 2:hrs 40 mins.
For the return you would have to take the bus or another company or train between Cordoba and Seville where you could pick up the return www.alsa.es service from Seville to Lisbon.