Let H represent the number of hours that must pass before the second car catches up with the first. This is a rate x time = distance problem.
50 m/h H = 70 m/h (H-2)
50H = 70(H-2) = 70H - 140
This is by virtue of the distributive property of multiplication over addition.
0 = 20H - 140
We subtract 50H from each side.
140 = 20H
We add 140 to each side.
7 = H
We divide each side by 20.
Seven hours is required for the two cars to encounter each other.