How much pure acid should be mixed with 3 gallons of a 20% solution in order to get a 40% acid solution?

I know how to set up the problem but I just can't seem to get the right answer. I know the formula is:
x+%1(gallons)=%2(x+gallons)
Help Please!