The difference counts only due to 40% of the profit which was distributed according to their investments.
Let total profit = R.
40% of R is distributed in the ratio, 125000 : 85000 = 25 : 17
Share of 1st partner = 40% of R x25/(25 + 17)
= 40% of 25R/42 = (40/100) x (25R/42) = 5R/21
Share of 2nd partner
= 40% of 17R/42 = (40/100) x (17R/42) = 17R/105
Now according to the question
5R/21 - 17R/105 = 600
⇒ R(25 - 17)/105 = 600
⇒ R = (600 x 105)/8
= ₹ 7875