X = amount of the 18% solution
y = amount of the 40% solution
we know the 18% solution has only 18% of alcohol, the rest is maybe water or something, now, how many liters is 18%? well, 18% of anything is just (18/100) * anything, so, 18% of x is just (18/100) *x or 0.18x, and that's how many liters are there.
likewise, how many liters are there in the 40% solution? well, (40/100) * y, or 0.4y, that many.
we know the mixture has to yield 10 liters at 20% alcohol, how many liters of only alcohol is that? well, (20/100) * 10, or 2 liters.


how much of the 40% solution? well y = 10 - x