Question 301711
First name the variables.
A-gallons of 20% solution
B-gallons of 10% solution
Then set up an equation for the total volume of solution.
1.{{{A+B=40}}}
Then set up an equation for the concentration of the solution.
{{{20A+10B=16(A+B)=16(40)=640}}}
2.{{{2A+B=64}}}
Now you have 2 equations in 2 unknowns. 
Solve it using substitution, elimination, etc. to get A and B. 
Re=post if you get stuck.