How to solve this problem?

Answer:
2 gallons
Step-by-step explanation:
Let x = amount of acid added in gallons
Let x + 2 = the amount of acid added plus the 2 gallons
We want to make an equal to equation.
40% can be expressed as 0.4. 70% can be expressed as 0.7
Then write the equation:
x + 2(0.4) = (2 + x)(0.7)
Simplify:
x+0.8 = 1.4+0.7x
Subtract 0.7x from both sides
x - 0.7x + 0.8 = 1.4
Subtract 0.8 from both sides
x - 0.7x = 1.4 - 0.8
Collect like terms:
0.3x = 0.6
Divide both sides by 0.3 to solve for x:
x = 2