Answer:
takes 3 minutes, at 17 gallons per minute, for the tap to fill the tub, so 51 gallons of water flow into the tub.
The capacity of the tub is 46.5 gallons; so in 3 minutes 51-46.5 = 4.5 gallons have leaked. That's a rate of 4.5/3 = 1.5 gallons per minute.
The amount of time it will take the tub to drain at that rate is 46.5/1.5 = 31 minutes.