LET the TOTAL profit be N,
Then, A's share in profit = 3N/5
Remaining profit = N - 3N/5 = (5N - 3N) / 5 = 2N/5
B's share in profit = N/5
C's share in profit = N/5
According to the question,
(3N/5 - N/5) = 400
2N/5 = 400; N = (400 x 5)/2 = 1000