.
At the time t, the southern leg is 40t miles; the western leg is 30t.
The hypotenuse of the right angled triangle, which is the distance between the cars, is, according to Pythagoras
d =
=
=
= 50t miles.
ANSWER. The distance between the cars as function of the time is d = 50t miles.
Solved.