Hi
Let x= amount of 40%, y= amount of 80%
0.40x + 0.80y = 0.5(20)
x + y = 20 OR x = 20-y
good Work! substituting (20-y) for x
0.40(20-y) + 0.80y = 0.5(20)
.40y = .5(20)-.40(20)
y = .10(20)/.40
y = 5 gal of the 80% solution and 15gal of the 40% solution (5 + 15 = 20)