Answer
The distance from the first ship to the lighthouse is $24.6\ \text{miles}$.
Work Step by Step
The lighthouse, the first ship, and the second ship make a right triangle.
The triangle is labeled as $ABC$ , where $C$ is the position of the lighthouse, $A$ is the position of the first ship and $B$ is the position of the second ship. From ship $B$, the bearing to the lighthouse is $N64{}^\circ E$. The north line diagram is represented by the line segment $AB$.
To measure the distance, we have to use the $\tan $ formula in the above diagram:
$\begin{align}
& \tan \theta =\frac{\text{perpendicular}}{\text{base}} \\
& \tan 64{}^\circ =\frac{d}{12} \\
& d=12\tan 64{}^\circ \\
& =24.6 \text{miles}
\end{align}$