You need to express the distance z (or its square) as a function of t only, take the derivative with respect to t and equate it to zero.
A truck is 30 km due west of an SUV and is travelling east at a constant speed of 70 km/h. Meanwhile, the SUV is going south at 90 km/h. When will the truck and the SUV be closest to each other?
I set up a triangle, defined dx/dt as -70t, dy/dt as 90t, and used Pythagorean theorem:
z^2 = x^2 + y^2
I then took the derivative of this.
I'm not sure where to go from here?