This is a well-known problem involving a water barrel and a wine barrel, described here. The trick to solving the puzzle is that one need not make the calculations for each stage of the liquid movement. But if one does...
The units here are the quantity of liquid moved each time, e.g. cupfuls. At the end of each "take out/put back" movement, the amount of wine in one barrel is the same as the amount of water in the other, so we can consider just the two volumes of liquid without caring about what they are made from.
At the beginning the two volumes are $0$ and $n$, say.
After the first movement the volumes are $$\frac{n}{n+1}\text{ and }\frac{n^2}{n+1}.$$
After the second the volumes are $$\frac{n(2n)}{(n+1)^2}\text{ and }\frac{n(n^2+1)}{(n+1)^2}.$$
After the third the volumes are $$\frac{n(3n^2+1)}{(n+1)^3}\text{ and }\frac{n(n^3+3n)}{(n+1)^3}.$$
There is a pattern here suggesting that after $t$ goes the volumes are
$$\frac{n}{(n+1)^t}\sum_{k=0}^{t/2-1}{\binom{t}{t-2k}n^{2k}}$$ and $$\frac{n}{(n+1)^t}\sum_{k=0}^{t/2}{\binom{t}{t-2k-1}n^{2k+1}}.$$
As more liquid is moved the two volumes will each start to approach $\dfrac{n}{2}$.
To my question: how do we show that the two volumes above both tend to $\dfrac{n}{2}$ as $t\rightarrow\infty$?