Let x and (12-x) litres of milk be mixed from the first and second container respectively
Amount of milk in x litres of the the first container = .75x
Amount of water in x litres of the the first container = .25x
Amount of milk in (12-x) litres of the the second container = .5(12-x)
Amount of water in (12-x) litres of the the second container = .5(12-x)
Ratio of water to milk = [.25x + .5(12-x)] : [.75x + .5(12-x)] = 3 : 5
⇒ (.25x+6-5x)/(.75x+6-.5x) =3/5
⇒(6−.25x)/(.25x+6) =3/5
⇒30−1.25x=.75x+18
⇒2x=12
⇒x=6
Since x = 6, 12-x = 12-6 = 6
Hence 6 and 6 litres of milk should mixed from the first and second container respectively