Let AD be the light house and B and C be the positions of the two boats.
Let BD = x, CD = 100 - x (Given, BC = 100 m)
In triangle ABD,
So, AD = x
In triangle ADC,
We hope that clarifies your query.