X = amount of 50% solution y = total amount after mixing
Note that the amount of alcohol in the 20% solution is 80 (0.2) = 16 oz.
We have 2 unknowns, so we need 2 equations: first, we can write the equation for the total volume: y = x + 80
next, apply the percentages to get an equation for the amount of alcohol:
0.4 y = 0.5 x + 16
Finally, solve the pair of equations (in this case, by substitution of the 1st into the second: 0.4 (x + 80) = 0.5x + 16 0.4 x + 32 = 0.5X + 16 rearrange and combine like terms: 0.1x = 16 x = 160 from the 1st equation: y = 160 + 80 = 240