let's say it holds "x" gallons of gas.
how much is 1/3 of that? well is just (1/3)x.
how about 1/2 of that? well is just (1/2)x.
we know that
[tex]\bf \stackrel{\textit{originally}}{\cfrac{1}{3}x}+\stackrel{\textit{gas bought}}{2}~~=~~\stackrel{\textit{sum of both}}{\cfrac{1}{2}x} \\\\\\ \stackrel{\textit{multiplying both sides by }\stackrel{LCD}{6}}{6\left( \cfrac{1}{3}x+2 \right)=6\left( \cfrac{1}{2}x \right)}\implies 2x+12=3x\implies 12=x[/tex]
notice, we simply multiplied both sides by the LCD of all fractions, to just do away with the denominators.