-I'm not clear what part of the trip you'll do by public transportation and what by rental car. I don't see a need to go to Yosemite by public transportation (roads should be fine), but if you do, you only go from Merced to Yosemite by YARTS company bus. You can go from San Francisco to Yosemite via Amtrak (Amtrak bus to Emeryville, then Amtrak train to Merced, then YARTS bus to Yosemite, all booked through Amtrak) or Greyhound (Greyhound bus from SF to Merced, then, booked separately, YARTS bus to Yosemite).
-If you don't feel comfortable driving to Yosemite, skip Sequoia. Roads no better, and virtually impossible to get to by public transportation. And you will already have seen the best mountain scenery, in Yosemite (even redwoods).
-If you have a car and IF Tioga Pass is oen, best to drive from Yosemite to Hwy. 395 and south from there.
-You need to do a lot more research on roads, car rentals, lodging prices, etc.