# GRE word problem 2

Question: At $1$ PM, Ship $A$ leaves port heading due west at $x$ miles per hour. Two hours later, Ship $B$ is $100$ miles due south of the same port and heading due north at $y$ miles per hour. At $5$ PM, how far apart are the ships?

Solution: I do not understand the figure they've drawn in the solution. I am confused especially about the perpendicular line that Ship $B$ is traveling and find the wording difficult to grasp. The answer is $s=\sqrt{(4x^{2})+\left ( 100-2y \right )^{2}}$.

So can anyone help me understand what's going on here? Thanks.

Ship A traveled four hours (between 1 PM and 5 PM), and thus its distance from port is $\;4x\;$ .
Ship B traveled only two hours (from 3PM to 5PM) due north when it was $\;100\;$ kms. from port, so it covered a distance of $\;2y\;$ in these two hours and then its distance from port is now $\;100-2y\;$ .