Proportion of liquid A and B is 7:5
A/B =7/5 that is 7B=5A implies 7B-5A=0 .................eq (1)
9 litr mixture water drawn off , so remining of liquid A is 7*9/12 = 5.25 and that of liquid B is 5*9/12 =3.75
After filling liquid B, the proportion becomes 7:9
That is (7A-5.25)/(5B-3.75+9B) = 7A/9B ..................eq(2)
solving the above two equations, we get A= 21 liter