2 gallons of fruit punch that is 15% alcohol contains .15*2 = .3 gallons of alcohol.
x gallons of fruit punch that is 20% alcohol contains .2x gallons of alcohol.
The 5 of alcohol in the new mixture is the gallons of alcohol, .2x + .3 divided by the total gallons, x+2.
That fraction, (.2x+.3)/(2+x) = .18.
Solve it for x.
.2x + .3 = .36 + .18x
.02x = .06
x = 3 gallons.
Hope the solution helped. Sometimes you need more than a solution. Contact fcabanski@hotmail.com for online, private tutoring, or personalized problem solving (quick for groups of problems.)