Question 421151
Let x=amount of 25% alcohol needed
Then 20-x=amount of 50% alcohol needed
Now we know that the amount of pure alcohol that exists before the mixture takes place (0.25x+0.50(20-x)) has to equal the amount of pure alcohol in the final mixture (0.40*20).  So our equation to solve is:

0.25x+0.50(20-x)=0.40*20 simplify
0.25x+10-0.50x=8 subtract 10 from each side and collect like terms
-0.25x=-2
x=8 liters------------------------amount of 25% alcohol needed
20-x=20-8=12 liters -----------------amount of 50% alcohol needed
CK
8*0.25 + 12*0.50=0.40*20
2+6=8
8=8

BTW problems such as this can also be solved using two equations and two unknowns, e.g.,
x+y=20--------------------eq1
0.25x+0.50y=0.40*20-------eq2

Hope this helps---ptaylor