We know that two of the three angle of the triangle are \(30^\circ\) and \(180^\circ-50^\circ=130^\circ\), so the third angle is \(180^\circ-30^\circ-130^\circ=20^\circ\).
Let \(x\) denote the distance to the lighthouse.
Then, \(\dfrac{x}{\sin30^\circ}=\dfrac{2}{\sin20^\circ}\), so \(x=\dfrac{2\sin30^\circ}{\sin20^\circ}=2.92\) miles.