# Allegation concept clarity regarding total mixture?

"In a jar there is mixture of milk and water in the ratio of 7:5. 9 liters of mixture was taken out and replaced by same quantity of water and after that the ratio becomes 7:9 in the jar. find out original quantity of mixture or find out quantity of milk in jar?"

After solving this by allegation i got ratio of mixture and water 3:1. if 1 is equal to 9 then 3 must be equal to 27 and 3 was total mixture so total mixture was 27 liters according to me. but the answer is total mixture was 36(27+9).

I can't understand why?

Let $x$ be the total mixture volume in litres. Assume that the mixture is well-mixed, so that the $9$ litre sample also has a milk-water ratio of $7:5$. Let's focus on the milk.
Originally, we start with $\frac{7}{12}x$ litres of milk. We remove $\frac{7}{12}(9)$ litres of milk from this mixture and replace it with $\frac{7}{12}(9)$ litres of water. Finally, we should end up with $\frac{7}{16}x$ of milk. Thus, we have: \begin{align*} \frac{7}{12}(x - 9) &= \frac{7}{16}x \\ 16(x - 9) &= 12x \\ 4(x - 9) &= 3x \\ 4x - 36 &= 3x \\ x &= 36 \end{align*}