You have the distance between the ships as 4km. It's also relatively easy to see that the angles in the triangle are $\displaystyle \displaystyle \begin{align*} 20^{\circ}, 153^{\circ}, 7^{\circ} \end{align*}$. This is enough information to use the Sine Rule to evaluate the length from where the ship started to the lighthouse.
Once you have that length, it becomes the hypotenuse of a right angle triangle with d as the vertical length and an adjacent angle of $\displaystyle \displaystyle \begin{align*} 70^{\circ} \end{align*}$. You should be able to evaluate that distance.