Spiralflex, i got it.
Let the horizontal distance between the ships after a time t after 2pm be (104-x)
Let the vertical distance between between the ships after a time t be y
Let the average distance between the ships after a time t be z
By the Pythagorean theorem:
z^2=(104-x)^2+y^2
z^2=10816-208x+x^2+y^2
As x=16t, y=24t,
z^2=10816-208(16t)+(16t)^2+(24t)^2
z^2=10816-3328t+832t^2
Differentiating w.r.t. time t:
2z(dz/dt)=1664t-3328
Minimum distance occurs when dz/dt=0,
1664t=3228
t=2
Now, z^2=10816-3328+832t^2
When t=2,
z^2=10816-3328(2)+832(2)^2=7488 km
z=86.53 km
Therefore, the minimum distance of 86.53 km occurs between the ships when t=2 (ie at 4pm)