In order to determine how many gallons are in the tub, you take into account that you onl have filled 1/7 of the capacity of the tub.
Then, you multiply the previous factor by the capacity of the tub (which is 17.5 gallons), just as follow:
(1/7)*(17.5) = 2.5 gallons
Hence, 2.5 gallons of water are in the tub.