We can solve this with a proportion
3.5 miles / ( 1/4 gallon) = 1 mile / x gallons ...... cross-multiply
3.5 * x = (1/4) * 1 divide both sides by 3.5
x = (1/4) / 3.5 [note 3.5 = 35/10 = 7/2 ]
x = (1/4) /( 7/2)
x = (1/4) (2/7) = 2/28 gallons = 1/14 gallons