85% of the total profit is divided in the ratio 2 : 10 : 5.
85% of total profit = 2x + 10x + 5x = 17x
Total profit = (17x / 85% )
Share of Ram in the profit = 2x + 15% of 20x =2x+ 3x= 5x
Share of Shyam in the profit = 10x
Share of Ghanshyam in the profit = 5x
Now, (10x + 5x) - 5x = 500
10x = 500
=>x = 50
∴ Total profit = 20 x 50 = Rs.1000.