$\textbf{Problem}$: Two cars are driving on the highway in the same direction. Suppose they are driving at different speed at every moment. Show that the cars can only pass each other once at most.
I have tried solving this problem like this: let $f$ be the travelled distance of car 1 and $g$ the travelled distance of car 2 during the time interval $[t_{1},t_{2}]$. We know that $f'(t) \neq g'(t)$ for every $t \in [t_{1},t_{2}]$. Now according to Cauchy's mean value theorem, there exists a $c \in ]t_{1},t_{2}[$ so that $(f(t_{1})-f(t_{2}))*g'(c)=f'(c)*(g(t_{1})-g(t_{2}))$. I'm stuck from here on so I'm not sure if I'm actually using a correct method. Can someone help me on this one? Thank you!
Try this. Let $d(t)=f(t)-g(t)$, representing how far the cars are away from each other.
If $f'(t)$ and $g'(t)$ are continuous functions, which they should be in a standard automobile, then $f'(t)>g'(t)$ for all $t$ on the interval, or $f'(t)<g'(t)$ for all $t$ on the interval.
Now consider case 1: $f'(t)>g'(t)$. If $f(t_1)>g(t_1)$, then the cars will not pass each other. However, if $f(t_1)<g(t_1)$, then the car F may pass car G. This may or may not happen if the interval is too short, the difference in speeds is too little for the time interval, etc. But it is possible for car F to pass car G in this case.
Consider case 2: $g'(t) > f'(t)$. If $g(t_1)>f(t_1)$, then the cars will not pass each other. But there is a possibility that if $g(t_1)<f(t_1)$ that car G passes car F.
Now for your mean value theorem. If the cars manage to pass each other twice, say at time $t_3$ and $t_4$, then $d(t_3)=d(t_4)=0$. Because of the continuity and differentiability of $d(t)$, MVT tells us that there exists a $c$ on the open interval $t_3$ and $t_4$ where $d'(t)=0$. Seems fine right?
Well if $d'(t)=0$, then $f'(t)-g'(t)=0$, and that implies the cars are traveling at the same speed.
NOPE
So the cars can pass each other up to one time under the right circumstances.