Rewrite the fractions so they have a common denominator:
1/2 = 3/6
The tank was at 1/6 so:
3/6 - 1/6 = 2/6 simplifies to 1/3 of gas was added by the 7 gallons
There are three 1/3's to a whole ( full tank).
7 x 3 = 21
The gas tank can hold 21 gallons.