Answer:
20 gallons or 160 pints or 75.7082 liters
Explanation:
Let v represent the volume (in gallons) of 80% solution that needs to be added. The mixture wants to be 50% Butterbeer, so we have ...
v·80% + 20·20% = (v+20)·50%
80v +400 = 50v +1000 . . . . multiply by 100, eliminate parentheses
30v = 600 . . . . . . . subtract 400+50v
600/30 = v = 20 . . . . . divide by the coefficient of v
_____
Comment on units
The units for measuring v are the same units used to measure "20". That is, they are gallons. (Our equation does not make sense otherwise.) The problem statement does not specify units, so we can choose any we like, such as pints (suitable for beer), or liters (an international standard). The number entered for an answer could be "1" (20-gallon keg).
For a problem such as this, when you define your variable using a "let ..." statement, you also need to define the units in which it is measured. This can keep you out of trouble (and show you where units conversions are necessary), especially when the problem uses different units for different parts of the problem.