Answer:
[tex]\boxed{\text{5 gal}}[/tex]
Explanation:
The volume of pure alcohol is constant.
The total volume after mixing is (x + 10) gal.
[tex]\begin{array}{rcl}\text{Vol. alcohol in 50 \% + Vol. alcohol in 35 \%} & = & \text{Vol. alcohol in 40 \%}\\c_{1}V_{1} + C_{2}V_{2}&=& c_{3}V_{3}\\50x + 35 \times 10 & = & 40(x+10)\\50x + 350 & = & 40x + 400\\10x + 350 & = & 400\\10x & = & 50\\x & = & \mathbf{5}\\\end{array}\\\text{You must mix $\boxed{\textbf{5 gal}}$ of 50 \% alcohol with 10 gal of 35\% alcohol.}[/tex]
Check:
[tex]\begin{array}{rcl}50 \times 5 + 35 \times 10 & = & 40(5 + 10)\\250 + 350 & = & 40 \times 15\\600 & = & 600\\\end{array}[/tex]