X is due east point of y on a coast. Z is another point on the…