A vessel contains $x$ gallons of wine and another contains $y$ gallons of water. From each vessel, $z$ gallons are taken out and transferred to the other. From the resulting mixture in each vessel, $z$ gallons are again taken out and transferred to the other. If after the second transfer, the quantity of wine in each vessel remains the same as it was after the first transfer, then show that $z(x+y)=xy$.
I have been trying to solve this question for many many days and would like a solid proof for it!