a. A person borrowed a sum of money at the rate of 5% per annum simple interest for 2 years and immediately he lent it at compound interest at the same rate for the same duration of time. If he gained Rs. 30 in this transaction, find the sum borrowed.