For the two angle of depressions one at the top of mast and other at the base will provide two distinct equation is terms of distance between the ship and lighthouse.
Let the distance between the ship and lighthouse be represented by X
y be the vertical distance above height of ship i.e meters.