We live in San Mateo and my son takes the Amtrak bus from Cal Poly (Station Code SLP) to San Jose (Station Code SJC) and then hops on a CALTrain to San Mateo. You can buy Amtrak tickets online @
Amtrak - Reservations - Fare Finder however there is a trick to it. You can only purchase a ticket online if it includes a segment on an actual train so what you do is buy a ticket to Fremont and don't use the train segment. The cost, $34.00, is the same.
My son enjoys the bus ride, it has WiFI and movies, and he alleges that he gets homework done.