A pitcher contained 5g-2 gallons of water. Water was then poured from the pitcher into a glass that has a capacity of (g-5)gallons how many gallons of water are left in the pitcher?
You have two different volumes:
To know how many gallons of water were left in the pitcher after pouring water into the glass you have to subtract the glass volume from the pitcher volume:
5g-2 - (g-5)
Rearrange the equation (to see it clearly)
4g+3 These are the gallons of water left in the pitcher.