Before the start of the car race, Tony Stewart and Jamie Mcmurray have the same amount of fuel in the car. With this fuel Tony Stewart can drive for 4 hours while Jamie can drive five hours.
After a time they realize that amount of fuel left in Tony car is 1/4th of the fuel in Jamie car.

For long they are racing ?

15/4 hours

Let us say they drive for "t" hours and initial fuel is "f"

Amount of fuel used by Tony car is ft/4
Amount of fuel used by Jamie car is ft/5

As per given condition,
f - ft/5 = 4(f-ft/4)
Solving, t = 15/4 hours