Theo drove a slow car 996 miles to Oregon last spring and used a total of 40 gallons of gasoline. what was the average miles driven per gallon of gasoline?

Do I divide 40/996 to get this answer?

It asks for miles per gallons

or miles / gallons

So which numbers go where?