We have to remember that a unit rate is a rate (a fraction that compares two quantities with different units) with the unit in the denominator.
Then, to solve this question, we need to divide the given miles by the total of gallons to have the unit rate. Then, we have:
Then, the unit rate is 7 1/2 miles per gallon.