Say car $B$ takes $t$ minutes to travel $15$ km. Then car $A$, which is the faster car, takes $t - 5$ minutes to travel $15$ km.
By rearranging these, we have that
- the speed of car $A$ is $15/(t - 5)$ km/min,
- the speed of car $B$ is $15/t$ km/min.
Now $5$ hours is equal to $300$ minutes. If they collectively travel $750$ km after $300$ minutes, then we have (using $\text{distance} = \text{speed} \times \text{time}$)
$$
300\times \left(\frac{15}{t - 5}\right) + 300\times \left(\frac{15}{t}\right) = 750.
$$
Using simple albegra, we have
$$
\frac{6}{t - 5} + \frac{6}{t} = 1
$$
so that
$$
t^{2} - 13t - 30 = 0.
$$
I will leave it to you to fill the workings between those three equations.
Hover over the following box for the remainder of the solution, but I would suggest doing so after giving the rest a go yourself.
From here, we use the quadratic formula for $t$ to find
$$t = \frac{13 \pm \sqrt{13^{2} - 4(-30)}}{2} = \frac{13 \pm \sqrt{169 + 120}}{2} = \frac{13 \pm 17}{2}.$$
We want $t$ to be positive so we have $t = 15$. Thus
$$\begin{array}{ll} 1. & \text{the speed of car $A$ is $15/(15 - 5) = 1.5$ km/min, or $90$ km/hour;}\\ 2. & \text{the speed of car $A$ is $15/15 = 1$ km/min, or $60$ km/hour.}\end{array}$$