Let's rewrite it in Math language:
100% Pure acid + 20% x 6 Gal. = 40% (Pure Acid + 6 Gal)
For easy calculation let's write the figures without %
100 Pure acid + 20 x 6 Gal. = 40 (Pure Acid + 6 Gal)
100 Pure Acide + 120 Gal = 40 Pure Acid + 240
100 Pure Acid - 40 Pure Acid = 240 - 120
60 Pur Acid = 120 Gal
Pur Acid = 120/60 = 2 Gal