First notice that neither tank will change in total gallons at any time.
The pump is just mixing the water among the 2 tanks continuously. So eventually the concentration in each tank will be the same as concentration of both tanks put together.
Total gallons = 500, Total Salt = 50
Concentration = 50/500 = 1/10
If tank A has this concentration , then salt = 20
For tank B the salt amount is then 30.
This gives us 2 points, an initial amount and a finishing amount as t -> infinity.
To find functions for x(t) and y(t) , we need to look at the rate of change.

For tank A, 20/300 or 1/15 of tank B salt is coming in. While 20/200 or 1/10 of its own salt is leaving.
For tank B its just the other way around.
This will give a system of 2 differential equations:


From this we can say:


Plug this in for y in the dx/dt equation:

Solving this differential equation gives:



The dy/dt equation is solved exactly the same way, so you have:

All thats left is to apply initial and final conditions to get constants.
The final solution is:

