Two vehicles at an intersection, using derivatives 
An automobile traveling at a rate of $30$ ft/sec is approaching an intersection. When the automobile is $120$ ft from the intersection, a truck traveling at the rate of $40$ ft/sec crosses the intersection. The automobile and the truck are on roads that are at right angles to each other. How fast are the automobile and the truck seperating $2$ sec after the truck leaves the intersection?

I don't know how to do this question, could anyone help?
I have to use derivative to do this.
 A: In the two seconds after the truck crosses the intersection, the distance travelled by the automobile is $30\times2=60$ ft. It's distance from the intersection is now $120-60=60$ ft.
The distance travelled by the truck in this interval is $40\times2=80$ ft, which is its distance from the intersection.
Now, the automobile, the truck, and the intersection form a right angled triangle right angled at the intersection. Let the distance of the automobile from the intersection be $x$ and that of the truck be $y$. Then, by the Pythagoras theorem, the distance between each other is
$$\tag1d^2=x^2+y^2$$.
At this instant,
$d=\sqrt{60^2+80^2}=100$ ft.
Differentiating $(1)$ with respect to time,
$$2d\frac{d}{dt}(d)=2x\frac{dx}{dt}+2y\frac{dy}{dt}$$
We wish to find $\frac{d}{dt}(d)$. The values of $x,y$, and $d$ are known.
$\frac{dx}{dt}=-30$ft/sec and $\frac{dy}{dt}=40$ft/sec. Using these, the problem can be solved.
Taking appropriate units, $x=60,y=80,d=100,\frac{dx}{dt}=-30,\frac{dy}{dt}=40$
Then,
$$d\frac{d}{dt}(d)=x\frac{dx}{dt}+y\frac{dy}{dt}$$
$$100\times\frac{d}{dt}(d)=60\times(-30)+80\times40$$
$$100\times\frac{d}{dt}(d)=3200-1800=1400$$
$$\frac{d}{dt}(d)=14\text{ ft/sec}$$
