To answer this problem, it is best to draw a diagram. Below, I have drawn one:
Next, you need to setup an objective function (an equation expressing the quantity you want to minimize or maximize).
The distance, d, between the two ships is given by Pythagorean's Theorem.
D^2 = A^2 + B^2
Then, we take the derivative of this function with respect to the time in this case.
2D(dD/dt) = 2A(dA/dt)+2B(dB/dt)
D(dD/dt) = A(dA/dt)+B(dB/dt)
Since this question asks for the rate at which the distance is changing at 4pm (t = 4), we need to find the value of dD/dt.
(dD/dt) = [A(dA/dt)+B(dB/dt)]/D
The problem gives you dA/dt and dB/dt (25 and 35 respectively). It is now your job to find how far from the origin A and B have traveled in four hours and compute the distance, D, between them. Keep in mind that A's initial coordinate is (0,0) and B (150,0).
With all of these quantities, you can compute the rate at which the ships are sailing apart, dD/dt.
I really hope this helps!
If you need more help in this course, feel free to contact me to setup online tutoring. I'd love to help you meet your goals in this course. Calculus is tough at first, but after I learned some awesome tricks and inner-workings I started to love it.
Looking forward to hearing from you!