A and B start a business with investment of Rs. 5000 and Rs. 4500 respectively. After 4 months, A takes out half of his capital. After two more months, B takes out one-third of his capital while C joins them with a capital of Rs. 7000. At the end of year they earn a profit of Rs. 5080. Find the share of each member in the profit.