Given data:
The average speed of the car is
![S=45\text{ miles/hour}](https://img.qammunity.org/2023/formulas/physics/college/sfsgzivf093kypzqx1istoqnsu4zloss6r.png)
The distance traveled by the car is
![D=90\text{ miles}](https://img.qammunity.org/2023/formulas/physics/college/tmm0zyu5aozr9x4uxs0yxnznln135jft8z.png)
The average speed can be expressed as,
![\begin{gathered} S=(D)/(T) \\ T=(D)/(S) \end{gathered}](https://img.qammunity.org/2023/formulas/physics/college/v2v9n26i3dpldu7hin33g42bicr04zdr8u.png)
Here, T is the time taken by the car.
Substituting the values in the above equation, we get:
![\begin{gathered} T=\frac{90\text{ miles}}{45\text{ miles/hour}} \\ =2\text{ hours} \end{gathered}](https://img.qammunity.org/2023/formulas/physics/college/o1p3h75sek86d0svs8wrm1jp144ll15b6m.png)
Thus, the time taken by the car is 2 hours, and option (B) is correct.