Hello, blueridge!
Did you make a sketch?
Two cars are approaching an intersection.
One is 2 miles south of the intersection $\displaystyle X$ and is moving north at 30 mph.
The other car is 3 miles east of $\displaystyle X$ and is moving west at 40 mph.
Express the distance $\displaystyle d$ between the cars as a function of time $\displaystyle t$. Code:
X 340t B 40t Q
*      *      *
 /
 /
230t  / d
 /
 /
A *

30t 

P *
The first car starts at $\displaystyle P$, 2 miles south of $\displaystyle X\!:\;\;PX=2$
In $\displaystyle t$ hours, it has moved $\displaystyle 30t$ miles north to point $\displaystyle A.$
. . Hence: .$\displaystyle AX \:=\:230t$
The second car starts at $\displaystyle Q$, 3 mile east of $\displaystyle X\!:\;QX = 3$
In $\displaystyle t$ hours, it has moved $\displaystyle 40t$ miles west to point $\displaystyle B.$
. . Hence: .$\displaystyle BX \:=\:340t$
From right triangle $\displaystyle AXB$, we have: .$\displaystyle d^2 \:=\:AX^2 + BX^2$
So we have: .$\displaystyle d \;=\;\sqrt{(230t)^2 + (340t)^2} $
. . which simplifies to: .$\displaystyle d \;=\;\sqrt{2500t^2  360t +13}$