It's generally not a good idea to lease a car if your intention is to buy it at the end of the lease, espeically if you're going to finance the end-of-lease buyout.
You'll be much better off just purchasing the car from the very beginning.
Reason being - when you lease a car, your overall cost of financing will be higher since you're not paying off any principle during the lease. Afterwards, when you purchase the vehicle, you'll need to take out another loan and end up paying more interest.
If you lease for 3 years and then take out a 5 year loan for the buyout, you'll be paying interest for 8 years!
That being said, there are times when you should purchase the car at lease end. One of the main benefits of a lease is that you don't take any risk when it comes to car value fluctuations. Leasing companies are not perfect and sometimes their predicted residual values are not in line with reality.
Take for example the case of Toyota's sudden acceleration problems awhile back. The values of used Toyotas took a nose-dive after the media sensationalized the stories and the public was afraid to purchase those vehicles. Anyone who leased a Toyota before the problems arose were protected by these price drops because all they had to do was return the car at lease end. The leasing companies took a hit on the lower valuations instead of the consumer.
Just as car values can drop, they can also rise unexpectedly. Used car values have been rising steadily since 2009 and a lot of leasing companies have set the residual values too low. At lease end, the buyout price of some vehicles are way below their market value.
When this happens, it presents consumers with an opportunity to make money at the end of the lease, simply by purchasing and reselling the car to another buyer. Most states allow you to purchase and sell a vehicle within 10 days without having to pay sales tax. Another option is to have the buyer purchase directly from the leasing company and pay you a commission based on the difference between buyout price and market value.
Check with your local DMV to confirm about the tax rules and make sure to have a buyer lined up shortly before your lease ends.
Remember that you can always negotiate with the leasing company - nothing is set in stone when it comes to the buyout price. If you really want to buy the car but the market value is below the buyout price, just offer them a realistic price - in many cases they will take it in order to save costs and hassles on their end.