For this case, the first thing we must do is define variables.
We have then:
n: number of gallons
d: distance traveled
r: distance rate per gallons
The equation that relates the variables is given by:

Substituting values we have:

Answer:
The number of gallons of gas they used is:
