A began a business with Rs. 85,000. He was joined afterwards by B with Rs. 42,500. For how long is B in the business, if the profits at the end of the year are divided in the ratio of 3 : 1?