Since the container is leaking at a constant rate and we know what the initial volume and final volume is, we can then find the change in volume.
The negative symbol indicates that the volume of water is getting less.
Now we also know the time it takes to leak 2 gallons which is 10 minutes.
The rate is simply
Substituting the values into the rate equation