Why is work force*displacement and not force*distance?

No.14301966 ViewReplyOriginalReport
Let’s say an object like a car needs 2e amounts of energy to accelerate forward a specific displacement
And another car with the same mass and acceleration move forward half the displacement of car 1 and back again with the same acceleration
Wouldn’t both objects need the same amount of energy to travel the same amount of distance?