The Bus traveled for 5 hours while the Car traveled for 4 hours
Here, we want to know the number of hours each of the vehicles traveled
Mathematically, we know that distance is speed multiplied by time
Let the time traveled by the bus be x hours
Since the time traveled by the car is 1 hour less, the time taken to travel by the car is (x-1) hours
Thus, the distance traveled by the bus will be 40 * x = 40x miles
The distance traveled by the car will be 50 * (x-1) = (50x-50) miles
As stated, the distance traveled by both is equal
Thus, we have to equate the two as follows;
The time taken by the car is 1 hour less and that would be 5-1 = 4 hours