Given below is a statement of legal principle followed by factual situation. Apply the principle to the facts and select the most appropriate answer.
A was arrested by the policy for committing an offence and was subsequently granted bail by the Court. One of the conditions imposed by the Court for granting bail was that A arrange for a surety for Rs.50,000. A approached B to be a surety. B agreed, but insisted that they enter into a contract whereby A would deposit Rs.50,000 into B's account, which would be returned to A by B after the case was over.