To solve this problem, we can use trigonometry and create a diagram to visualize the situation.
Let's denote the distance between the ship and the lighthouse as "d" (in miles).
From the information given, we know that the angle between the ship's direction of travel and the line connecting the ship to the lighthouse is 12 degrees when the ship is at its initial position.
Using trigonometry, we can set up the following equation:
tan(12 degrees) = d / x
where x is the distance between the ship and the lighthouse when the angle is 12 degrees.
Similarly, when the ship has traveled 5 miles farther, the angle between its direction of travel and the line connecting it to the lighthouse is now 22 degrees.
Using the same trigonometric relation, we can set up another equation:
tan(22 degrees) = (d + 5) / x
Now that we have two equations, we can solve for d and x simultaneously.
First, let's solve the first equation for x:
x = d / tan(12 degrees)
Next, let's substitute this expression for x in the second equation:
tan(22 degrees) = (d + 5) / (d / tan(12 degrees))
Now, we can solve this equation to find the value of d.
tan(22 degrees) = (d + 5) / (d / tan(12 degrees))
Rearranging the equation:
tan(22 degrees) * (d / tan(12 degrees)) = d + 5
Multiplying through by tan(12 degrees):
tan(22 degrees) * d = (d + 5) * tan(12 degrees)
Expanding and rearranging:
d * (tan(22 degrees) - tan(12 degrees)) = 5 * tan(12 degrees)
Finally, solving for d:
d = (5 * tan(12 degrees)) / (tan(22 degrees) - tan(12 degrees))
Using a calculator, we can evaluate this expression:
d ≈ 6.79 miles
Therefore, the ship is approximately 6.79 miles away from the lighthouse when the angle is 22 degrees.