Money Equation
1. **Stating the problem:**
Nimal and Kamal have a total of 400 rupees together.
When Nimal gives 500 rupees to Kamal, their amounts become equal.
We need to find how much each had initially.
2. **Assign variables:**
Let the amount Nimal has be $x$ rupees.
Let the amount Kamal has be $y$ rupees.
3. **Write equations:**
Since total money is 400 rupees,
$$x + y = 400$$
When Nimal gives 500 rupees to Kamal, both have equal amounts:
Nimal's new amount = $x - 500$
Kamal's new amount = $y + 500$
Since these are equal,
$$x - 500 = y + 500$$
4. **Solve equations:**
From the second equation,
$$x - y = 1000$$
We now have two equations:
$$\begin{cases} x + y = 400 \\ x - y = 1000 \end{cases}$$
Add the two equations:
$$2x = 1400 \implies x = 700$$
Substitute $x=700$ into $x + y = 400$:
$$700 + y = 400 \implies y = 400 - 700 = -300$$
5. **Interpret result:**
Kamal's amount is $-300$, which is not possible physically.
Thus, the problem conditions are inconsistent or misinterpreted.
**Final answer:**
There is no possible solution where both have $400$ total and Nimal giving $500$ rupees makes their amounts equal.