I apologize if this problem is more of a math- than a physics problem. At least it is applicable in real life :)
You are standing on some mountain and in your view are two other mountains, A and B. Also you can see the ocean as a referance zero point. The height of both mountains A and B are...