Answer: We start with the variable "x". Let's call "x" Dan's full tank.
So we know that right now he has 1/3x or 1/3 of a full tank.
After adding 12 gallons, at the end, he has 7/9x, or 7/9 of a full tank
So we start with
(1/3)x + 12 = 7/9x
Let's subtract 1/3x from both sides
12 = 7/9x - 1/3x
Remember, we need to use common denominators to subtract, so 1/3 becomes 3/9
12 = 7/9x - 3/9x
Now we simplify to get
12 = 4/9x
Multiply the reciprocal of 4/9 to both sides which is 9/4
12 * 9/4 = x
Answer is 27 gallons.