For 60 liters of 40% solution, write x = number of liters of 30% solution and y = number of liters of 60% solution.
Then equate 0.30x + 0.60y to 0.40(60) and write:
0.30x + 0.60y = 24
x + y = 60
Multiply (x + y = 60) by 0.30 to obtain 0.30x + 0.30y = 18.
0.30x + 0.60y = 24 (Equation A)
0.30x + 0.30y = 18 (Equation B)
0.30y = 6 (Equation A - Equation B)
Subtracting Equation B from Equation A gives 0.30y = 6 or y = 20 liters of 60% solution.
Putting y = 20 into (Equation A) gives 0.30x + 0.60(20) = 24 or x = 40 liters of 30% solution.