Let's assume that the car that goes near returns at a distance of 60km from the starting point, and the car that goes far returns at a distance of 60y km.
It will consume 2x barrels of gasoline when leaving, and X barrels when returning.
2x+x=24 x=8
So a car should return at a distance of 8*60=480 kilometers from the starting point.
The other car (y-8)*2+8=24 gets y= 16.
That is, the car farthest from the starting point has traveled 16*60*2= 1920 km.