This is correct, about the train and buses.
Here is the train schedule from Faro railway station to Lagos, the end of the line closest to Sagres. You'll have to catch a local bus from Faro airport into Faro proper; these run really often and stop very close to the train station, right downtown, so not a problem.
Timetables and prices search
www.cp.pt
As you can see, there are 13 trains a day, it's an hour and a half- to 2-hour run, and the latest one arrives in Lagos at 10:22 at night.
The Lagos train station is just a quick walk away, across a bridge over the marina, from 1/ the bus station and 2/ downtown Lagos with some small hotels. [Edit: sorry, this is an active web page, so you have to put in "Faro" and "Lagos" and "April 13th" to get the results. Otherwise, it's blank.]
Here's the bus schedule from Lagos to Sagres:
A website for public transport information in the Algarve Region of Portugal
www.algarvebus.info
You can see there's a bunch of buses, though a variety, depending on whether it's a weekday, a school day (weekday less holidays), or a weekend day, but several a day in any case to Sagres, or a couple continuing on an extra 20 minutes to Cabo Sao Vicente.
I'd be inclined to get to Lagos, if at all possible, the same day you arrive in Faro (via train), and then the next morning take the bus out to Sagres to start your walk. That way, you'd maximize your walking time! So, for instance, if you stayed in central Lagos on the 13th, you could catch a local bus at the bus station (very nearby) at 9 am on the 14th and be in Sagres by 10 am or Cabo Sao Vicente by 1020 to start walking.
You don't need to reserve ahead for the train ride; it's a no-reservation, commuter-type train that runs almost all the way across the Algarve coast, terminating at Lagos. Don't forget, if you're 65 or older, to present your passport and ask for a "reformado" ticket, for half price. And if you arrive at the very last minute--no panic; get aboard; you can buy your ticket (for cash) from the conductor. It's a really good system, I find.
(And don't get tricked like we did in Lagos; not knowing the route through town, we panicked and got a cab from the Lagos bus station to its railway station, spending a fair bit and going all round the edge of what is a fairly big place with a ring road; only to find, when standing at the railway station, that we could have walked across in 10 minutes!)
Also, the main bus station in Faro and the railway station are virtually next door to each other, so you really can decide which to use at the last minute, once you've come into town from the airport when you arrive.
Bom caminho!