So hmm check the picture below
both ships leave at the same time, one is going 16mph, the other 20mph, 2hrs later on the road
at 16mph well, 2hrs is just 16+16, or 32 miles away
20mph for 2hrs, is 20+20, or 40 miles away
using the law of cosines
again, recall, the angle is in degrees, so, when taking the cosine, make sure your calculator is in Degree mode