+1 Ken's suggestion of flying to Merced and then taking YARTS. (SFO is heinous. Never use it if you can avoid it.) If you like, you can get off YARTS in Mariposa, have dinner, and spend the night in a motel before heading to the valley on YARTS the next morning. Using YARTS also has the advantage that you don't contribute to the desecration of YV with private cars and parking lots. They have serious smog problems in YV in the summer.
I'm assuming you'll be buying the Wilderness Press guidebook by Wenk. She has good info on transportation to the trailhead. One thing that is somewhat out of date in the 4th edition is the description of public transportation to and from Lone Pine. There is now an ESTA bus that runs MWF. Going south, it can take you to Lancaster, from which you can make a commuter train connection to pretty much anywhere in LA.
You might want to consider flying in, but taking a Greyhound home. That way you don't have to compromise between imposing a death-march schedule on yourself and spending many days sitting around in a motel in Lone Pine. You exit when you exit.