Problems and Opportunities
Welcome aboard the RoadTrip America Forums!
First off, don't even consider buying a car. You'd spend your entire 2½ weeks dealing with bureaucracies and still not even have overcome the first of several legal hurdles. And even if you could pull it off, it would cost you a whole lot more than renting, and then you'd get a used rather than new car, and no one to call should it break down, etc., etc. Now, if you are both under 25, you can expect to pay about $500 each in underage driver fees if you both want to drive. If one of you is under 21, you will not be allowed to drive. And if you are both under 21, you will not be able to get a car. Period. Secondly, if you clear all those hurdles, you can expect to pay an additional $200-300 for the privilege of dropping the car off in a different city from where you picked it up.
The general trip you're contemplating is discussed in detail in these threads, but I can tell you that if you only plan to spend two days in Las Vegas, the Grand Canyon cannot be included in those two days. It is at least an overnight trip and next day return from Las Vegas. There are ($$$$) helicopter and fixed wing flights from Las Vegas to the "West Rim", but this is not the most spectacular part of the Canyon in the National Park, but the downstream portion of the Canyon on a private Indian Reservation. Probably your best bet for Yosemite is to drive through the Park on the way from Las Vegas to San Francisco, heading north up US-395 first and then taking CA-120 over Tioga Pass into and through the park.
AZBuck