The best way for both trips is by car!
The drive from Lisbon to Alvor takes 3 hours.
Lagos/Alvor/Portimão will take about four and a half to five hours.
See this article on my blog about my trip on this route last year.
http://bit.ly/lagosmalagacar
If, however, (and you do nor specify it), you are referring to public transport then the best option on both routes is Bus.
Lisbon - Alvor
There are regular buses throughout the day from Lisbon Gare Oriente bus station to Alvor operated by Renex.pt
Go to my blog here:
http://barlaventostravelblog.blogspot.com
Scroll down on the right hand side and you will find a panel
entitled:
Algarve & Portugal - Travel Transport Links
In this panel you will find links for:
# RENEX Bus Service - Lisbon to Algarve (including Lagos) timetable
Click on the latter and you will be able to download the latest timetable in pdf format.
2) Alvor - Malaga.
You will have to get a local urban bus to Portimão.
From there pick up the twice daily Portimão to Seville Bus.
In Seville change bus stations and get a bus direct from Seville to Malaga.
At present there is an EVA/DAMAS but that leaves Portimão at 07:00 and arrives in Seville Estacion das Armas at 13:00 (Spanish Time)
You will need to get a local C4 bus between Estacion Plaza das Armas to El Prado Bus Station which runs from just after 6 in the morning till 23:30.
You will then need to get the alsa.es 15:00 departure which arrives in Malaga at 17:45.
At present. the afternoon bus does not connect with ongoing alsa buses to Malaga