You are asked to calculate gas mileage for a car, and your answer comes out with units of gal/mi. This means that

you have divided the wrong way. You want mi/gal.

the units "gal/mi" represent the amount of gasoline consumed by a car per mile traveled. It denotes the inverse ratio of how many gallons of gasoline are used to travel one mile.

To calculate the gas mileage, you need two pieces of information: the number of gallons of gas consumed and the corresponding distance traveled in miles. The gas mileage can be determined by dividing the number of gallons by the number of miles.

For example, let's say you have a car that consumed 10 gallons of gas and traveled a distance of 200 miles. The calculation would be:

Gas Mileage = (Number of Gallons) / (Distance Traveled)
Gas Mileage = 10 gal / 200 mi
Gas Mileage = 0.05 gal/mi

In this case, the gas mileage would be 0.05 gal/mi, meaning the car consumes 0.05 gallons of gasoline to travel one mile.