recall your d = rt, distance = rate * time.
so, say car N goes north at 45mph, and car S goes south at 40mph.
after "some time" they'd be apart 350 miles, when that happens, N has been travelling for say "t" hours, and S has been travelling for the same "t" hours, their time has to be the same.
now, we know they'd be 350 miles apart, so if say N has gone "d" miles, then S has gone the slack, or "350 - d".
and we know their rates.
[tex]\bf \begin{array}{lccclll}
&\stackrel{miles}{distance}&\stackrel{mph}{rate}&\stackrel{hours}{time}\\
&------&------&------\\
\textit{Car N}&d&45&t\\
\textit{Car S}&350-d&40&t
\end{array}
\\\\\\
\begin{cases}
\boxed{d}=45t\\
350-d=40t\\
--------\\
350-\boxed{45t}=40t
\end{cases}
\\\\\\
350=85t\implies \cfrac{350}{85}=t\implies \cfrac{70}{17}=t\implies 4\frac{2}{17}=t[/tex]
which is about 4 hours and 7 minutes with 3.5 seconds.