Guarda is 55lkm from Vilamoura by the fastest car route, which includes toll roads, which will make the trip quite expensive. Transit time with stops 6 hours each way.
Train times from Loule Station (15 mins by taxi from Vilamoura) to Guarda via Lisbon vary between 7:30 mins and 10:20 minutes each way.
I have post an extract of the current relevant train timetable here on Scribd:
http://www.scribd.com/doc/13412496/Loule-Guarda
I have post an extract of the current Bus Times by Rede Expressos Bus here on Scribd:
http://www.scribd.com/full/13412787?access_key=key-23dywot7q8fw3fitqadv
Transit times are similar or longer than the train.
So if it is an urgent trip, car would be better. However, whichever mode you choose, going up and down even on two days will not leave you much time in Guarda.