Calculating time for distance to reach 10 km

Two boats leave port at the same time. One traveling 4 kph at a bearing of 20° and the other at 6 kph ata bearing of 60°. Find how long before the distance between the ships is 10 km.

I've drawn the angles of the boats as they leave the port, the first angle at 20 degrees and the second at 60 degrees. I determined the difference between the two angles is 40 degrees. Now I'm not sure how to find the time it takes for the distance between the two ships to be 10 km, as I only have an angle and a side measure of 10 km so far. Any advice? Thanks in advance.

Re: Calculating time for distance to reach 10 km

The most straightforward way is to express the x- and y-coordinates of the boats as functions of time, then express the square of distance as a function of time and equate it to 100. You'll get a quadratic equation in time. However, writing this in exact form is cumbersome. This method is suitable if you only need a numerical solution for concrete distance and not, say, to express time as a function of distance.

A simpler solution that also allows expressing time as a function of distance (or vice versa) is to use the law of cosines.