The problem here is that with the provision of the deposit, your friend has ipso facto agreed that he will buy the car. So if he reneges on this agreement, the person actually has the right to withhold the said deposit - as compensation for him not selling the car to another party.