She uses 800 mL of solution A; that is, 2% of those 800 mL is alcohol
Alcohol on a:
2% of 800 = 2*800/100 = 16mL
If we use x mL of b, the amount of alcohol is:
5% of x = 5*x/100 = x / 20
Total amount of alcohol: 16 + x/20
Total amount of solution mixture: 800 + x
The ratio:
(16 + x/20) / (800 + x) = 3%
(16 + x/20) / (800 + x) = 3/100
1600 + 5x = 2400 + 3x
Solving for x:
5x - 3x = 2400 - 1600
2x = 800
x = 400 mL
She used 400 mL of solution b