Let x be the distance traveled on the highway and y the distance traveled in the city, so:
Now, the system of equations in matrix form will be:
![\left[\begin{array}{ccc}1&1&\\ (1)/(65) & (1)/(25) &\end{array}\right] \left[\begin{array}{ccc}x&\\y&\end{array}\right] = \left[\begin{array}{ccc}375&\\7&\end{array}\right]](https://img.qammunity.org/2018/formulas/mathematics/high-school/mc9mocn0l6z3lnp51g7fbfoue6cb4w4pih.png)
Next, we are going to find the determinant:
![D= \left[\begin{array}{ccc}1&1\\ (1)/(65) & (1)/(25) \end{array}\right] =(1)( (1)/(25)) - (1)( (1)/(65) )= (8)/(325)](https://img.qammunity.org/2018/formulas/mathematics/high-school/kztw1s057np2q80baac89wd24415ccve5f.png)
Next, we are going to find the determinant of x:
![D_(x) = \left[\begin{array}{ccc}375&1\\7& (1)/(25) \end{array}\right] = (375)( (1)/(25) )-(1)(7)=8](https://img.qammunity.org/2018/formulas/mathematics/high-school/huuakuxfpfcgoo92givrhg9ql0jtwj5pbw.png)
Now, we can find x:

Now that we know the value of x, we can find y:

Remember that time equals distance over velocity; therefore, the time on the highway will be:

An the time on the city will be:

We can conclude that the bus was five hours on the highway and two hours in the city.