27 gallons
let x represent a full tank, then
[tex]\frac{2}{9}[/tex] x + 12 + [tex]\frac{1}{3}[/tex] x = x
multiply through by 9 to eliminate fractions
2x + 108 + 3x = 9x
5x + 108 = 9x ( subtract 5x from both sides )
108 = 4x ( divide both sides by 4 )
x = 27 ← full tank