Let x = gallons of the 20% acidic solution, then 0.2x = amount of acid in the 20% solution
y = gallons of the 70% acidic solution, then 0.7y = amount of acid in the 70% solution
24 = gallons of the 50% acidic solution, then 0.5(24) = amount of acid in the 50% solution
Thus, x + y = 24
0.2x + 0.7y = 0.5(24)
Solving by substitution: x = 24 - y
0.2(24 - y) + 0.7y = 0.5(24)
4.8 - 0.2y + 0.7y = 12
0.5y = 7.2
y = 14.4 gallons of the 70% acidic solution
x = 9.6 gallons of the 20% acidic solution