"Fuel economy" = "miles per gallon" = (distance traveled) divided by (gallons used)
mpg = (226 miles) / (10.5 gallons) = 21.52 miles per gallon (rounded)
It makes absolutely no difference whether the trip took 4 hours or 4 years.
That information is there just to try and trip you up. You don't need it.