Two ships leave a harbor at the same time, traveling on courses that have an angle of 120° between them. If the first ship travels at 30 miles per hour and the second ship travels at40 miles per hour, how far apart are the two ships after 3 hours?

Fig: 1