We need 2 equations to solve for the 2 unknowns.

Let V_{1} = volume of 5% solution and let V_{2} = volume of 40% solution

The equations are as follows:

V_{1} + V_{2} = 10

(0.05 * V_{1}) + (0.4 * V_{2}) = 10 * 0.2 = 2

Let's solve by substituting one equation into the other:

V_{1} = 10 - V_{2}

0.05(10 - V_{2}) +0.4V_{2} = 2

0.5 - 0.05V_{2} +0.4V_{2} = 2

0.35V_{2} = 1.5

V_{2} = **4.3 liters**

V_{1} = 10 - 4.3 = **5.7 liters**