In triangle ABL, A is the point at which the ship is 20 miles from the lighthouse, L, and the bearing is N33E (angle A). AL=20 miles.
The ship travels to B where L is now N54E. The exterior angle of a triangle (54º) is the sum of the two opposite interior angles A(=33º) and L, so L=54-33=21º. Using the sine rule AB/sin21=20/sin(180-54)=20/sin54=24.72 approx.
Therefore AB, the distance the ship has travelled, is 24.72sin21=8.86 miles approx. That is 8.9 miles to the nearest tenth of a mile.