Let x be the amount of the 30% alcohol and let y be the amount of 5% alcohol.
We want the total amount to by 25 gal, then we have:
![x+y=25](https://tex.z-dn.net/?f=x%2By%3D25)
We also want the resulting mix to be 25% alcohol, this is 0.25 in decimal form; also we know that the first type of alcohol is 30% and the second is 5%, then we have:
![\begin{gathered} 0.3x+0.05y=0.25(25) \\ 0.3x+0.05y=6.25 \end{gathered}](https://tex.z-dn.net/?f=%5Cbegin%7Bgathered%7D%200.3x%2B0.05y%3D0.25%2825%29%20%5C%5C%200.3x%2B0.05y%3D6.25%20%5Cend%7Bgathered%7D)
Hence we have the system of equations:
![\begin{gathered} x+y=25 \\ 0.3x+0.05y=6.25 \end{gathered}](https://tex.z-dn.net/?f=%5Cbegin%7Bgathered%7D%20x%2By%3D25%20%5C%5C%200.3x%2B0.05y%3D6.25%20%5Cend%7Bgathered%7D)
To solve the system we solve the first equation for y:
![y=25-x](https://tex.z-dn.net/?f=y%3D25-x)
then we plug this value of y in the second equation:
![\begin{gathered} 0.3x+0.05(25-x)=6.25 \\ 0.3x+1.25-0.05x=6.25 \\ 0.25x=6.25-1.25 \\ 0.25x=5 \\ x=\frac{5}{0.25} \\ x=20 \end{gathered}](https://tex.z-dn.net/?f=%5Cbegin%7Bgathered%7D%200.3x%2B0.05%2825-x%29%3D6.25%20%5C%5C%200.3x%2B1.25-0.05x%3D6.25%20%5C%5C%200.25x%3D6.25-1.25%20%5C%5C%200.25x%3D5%20%5C%5C%20x%3D%5Cfrac%7B5%7D%7B0.25%7D%20%5C%5C%20x%3D20%20%5Cend%7Bgathered%7D)
Once we have the value of x we plug it in the expression we found for y:
![\begin{gathered} y=25-20 \\ y=5 \end{gathered}](https://tex.z-dn.net/?f=%5Cbegin%7Bgathered%7D%20y%3D25-20%20%5C%5C%20y%3D5%20%5Cend%7Bgathered%7D)
Therefore, the mixture will have 20 gallons of 30% alcohol and 5 gallons of 5% alcohol.