Given data:
The average speed of the car is

The distance traveled by the car is

The average speed can be expressed as,

Here, T is the time taken by the car.
Substituting the values in the above equation, we get:

Thus, the time taken by the car is 2 hours, and option (B) is correct.