Let x be the distance traveled on the highway and y the distance traveled in the city, so:
[tex] \left \{ {{x+y=375} \atop { \frac{1}{65}x+ \frac{1}{25}y =7}} \right. [/tex]
Now, the system of equations in matrix form will be:
[tex] \left[\begin{array}{ccc}1&1&\\ \frac{1}{65} & \frac{1}{25} &\end{array}\right] \left[\begin{array}{ccc}x&\\y&\end{array}\right] = \left[\begin{array}{ccc}375&\\7&\end{array}\right] [/tex]
Next, we are going to find the determinant:
[tex]D= \left[\begin{array}{ccc}1&1\\ \frac{1}{65} & \frac{1}{25} \end{array}\right] =(1)( \frac{1}{25}) - (1)( \frac{1}{65} )= \frac{8}{325} [/tex]
Next, we are going to find the determinant of x:
[tex] D_{x} = \left[\begin{array}{ccc}375&1\\7& \frac{1}{25} \end{array}\right] = (375)( \frac{1}{25} )-(1)(7)=8[/tex]
Now, we can find x:
[tex]x= \frac{ D_{x} }{D} = \frac{8}{ \frac{8}{325} } =325mi[/tex]
Now that we know the value of x, we can find y:
[tex]y=375-325=50mi[/tex]
Remember that time equals distance over velocity; therefore, the time on the highway will be:
[tex] t_{h} = \frac{325}{65} =5hours[/tex]
An the time on the city will be:
[tex] t_{c} = \frac{50}{25} =2hours[/tex]
We can conclude that the bus was five hours on the highway and two hours in the city.