This was a simple division problem: At the place where they sold gasoline for $1.40/gallon, he could have bought: $8.40 / $1.40 = 6 gallons of gasoline At the place where they sold gasoline for $1.60/gallon, he could have bought: $8.40 / $1.60 = 5.25 (5 1/4) gallons of gasoline.