Answer :

It would take 21 minutes
As the first 8 minutes there would be 15 gallons in the pool
In 16 minutes there would be 30 gallons in the pool
Therefore you only need 10 gallons left which will be filled up in the space of 5 minutes
AL2006
There's a catch here, and I don't really want to go into full detail.  Because of
this catch, I think it would be unusually tough to write a simple equation for this
situation. If you wouldn't mind, let's just list it instead:

After . . water added . . total in pool

7 min . . . 14 gallons . . . 14 gallons
1 more . . 1 gallon . . . . . 15 gallons
7 more . . 14 gallons . . . 29 gallons
1 more . . 1 gallon . . . . . 30 gallons
5 more . . 10 gallons . . . 40 gallons, the pool is full

Add up all the minutes: 21 minutes