Let x, y represent the distance travelled by the cars after time, t.
We can construct a triangle for the movement of the two(2) cars, as shown below;
Let S be the distance between the two(2) cars.
By applying the Pythagoras theorem here, we have:
[tex]\begin{gathered} S^2=x^2+y^2 \\ \text{The rate is time dependent.} \\ \text{Thus, to find the rate here, we will differentiate with respect to t;} \\ 2s\text{ }\frac{ds}{dt}=2x\frac{dx}{dt}+2y\frac{dy}{dt}\text{ ----eqn i)} \end{gathered}[/tex][tex]\begin{gathered} \frac{dx}{\differentialDt t}=40\text{mph} \\ \frac{d}{\differentialDt t}y=20\text{mph} \\ \text{The distance x and y, after 2 hours will be;} \\ \text{Distance, x=sp}eed\times time=40\times2=80miles \\ \text{Distance, y=sp}eed\times time=20\times2=40miles \end{gathered}[/tex]Thus, we have:
[tex]\begin{gathered} S^2=\sqrt[]{40^2+20^2} \\ S^2=\sqrt[]{1600+400} \\ S^2=\sqrt[]{2000} \\ S=44.72 \end{gathered}[/tex]For the rate of distance, we have:
[tex]\begin{gathered} \text{from eqn i)} \\ 2(44.72)\text{ }\frac{ds}{\differentialDt t}=2(80)(40)+2(40)(20) \\ 89.44\text{ }\frac{ds}{\differentialDt t}=6400+1600 \\ 89.44\text{ }\frac{ds}{\differentialDt t}=8000 \\ \frac{ds}{\differentialDt t}=\frac{8000}{89.44} \\ \frac{ds}{\differentialDt t}=89.44\text{miles per hour} \end{gathered}[/tex]Hence, the distance between the two(2) cars is changing at the rate of 89.44 miles per hour.