Final answer:
The distance between the two cars can be expressed as a function of time using the Pythagorean theorem. At t = 0, the cars are 2 km apart, and as time progresses, their distances increase.
Step-by-step explanation:
The distance between the two cars can be expressed as a function of time using the Pythagorean theorem. Let's consider the time t as the independent variable. At t = 0, both cars leave the intersection, so the distance between them is initially given by:

As time progresses, the car headed south travels at a speed of 40 mph, which means its distance from the starting point increases by 40t miles. Similarly, the car headed west travels at a speed of 30 mph, increasing its distance from the starting point by 30t miles.
Using the Pythagorean theorem again, we can find the distance d between the two cars as a function of time:
