Take into account that the distances between the boats and the height of the lighthouse form right triangles.
Then, you have for the tangent of angles x and y, the following expressions:
you can notice on the given information that tan(y) = 4/3, then, the fraction between th height of the light house and the distance from boat B is 4/3.
For the other fraction (height of lighthouse over the distance from boat A) consider that
Hence, the fraction between the heoght of the lighthouse and the distance from boat A is 8/15