In a 10 gallon mixture, there are 7 gallons of A and 3 gallons of B.
If we add x gallons of B we will have 7+3+x=10+x gallons of mixture.
In those 10+x gallons there will be x+3 gallons of B so:
(x+3)/(10+x) is the proportion of B in the new mixture. We know this proportion is 42% or 0.42.
x=1.2/0.58=2.069 gallons approximately.