Use the notation to help you.
You know the general formula relating average rate, distance, and time
[MATH]d = r * t.[/MATH]
Subhotosh Khan told you to label the unknowns.
[MATH]d_1 = \text {distance travelled by car 1.}[/MATH]
[MATH]r_1 = \text {average rate of car 1.}[/MATH]
[MATH]t_1 = \text {time traveled by car 1.}[/MATH]
[MATH]d_2= \text {distance travelled by car 2.}[/MATH]
[MATH]r_2 = \text {average rate of car 2.}[/MATH]
[MATH]t_2 = \text {time traveled by car 2.}[/MATH]
[MATH]x = \text {final distance between the cars.}[/MATH]
Are all of those unknown?
No. We know that [MATH]t_1 = 2 \text { and } t_2 = 2.[/MATH]
We also know that x = 40.
So there are four unknowns. That means we need four equations.
[MATH]2r_1 = d_1.[/MATH] Just applying the general rule to the specific case.
[MATH]2r_2 = d_2.[/MATH] Same thing.
And the problem tells you that [MATH]r_1 = r_2 + 4.[/MATH]
All of that should be almost automatic if you name the relevant variables, determine which are unknown, and look for the obvious equations. Now we need to determine the non-obvious equation or equations. We have found three and need four. That last equation is best found using a diagram and seeing that the Pythagorean Theorem applies.
What is that fourth equation? Once you have that, the thinking is over. It’s just manipulation of symbols after that.[/MATH]