We know the equation
gives the number of cups if we know the numbe rog gallons.
If we want an equation that gives the number of gallons if we know the number of cups we just have to solve hte equation for g, that is:
Therefore, the equation we are looking for is: