Problem: a car traveled 340 miles per tankful of gasoline on the highway and 336 miles per tankful of gasoline in the city . if the car traveled 6 fewer miles per gallon in the city than on the highway , how many miles per gallon did the car travel in the city ?
Rationale: "let the speed in highway be h mpg and in city be c mpg . h = c + 6 h miles are covered in 1 gallon 340 miles will be covered in 340 / h . similarly c miles are covered in 1 gallon 336 miles will be covered in 336 / c . both should be same ( as car ' s fuel capacity does not change with speed ) = > 336 / c = 340 / h = > 336 / c = 340 / ( c + 6 ) = > 336 c + 336 * 6 = 340 c = > c = 336 * 6 / 4 = 504 answer a ."
annotated_formula: divide(336, divide(subtract(340, 336), 6))