BC/sin angle BAC = AB/sin angle ACB (sine theorem)
So AB = 40*sin angle ACB=40*sin( 1 15).
Let the coordinate of B be (0,0), then the coordinate of A is (40 sin (115) * cos (35), 40 sin (115) * sin (35).
So the distance between the ship and A is the root of (x-40sin angle ACB*cos angle ABC) 2+40 sin (115) * sin (35) 2.
If the root number of (x-29.6962) 2+20.7935 is 2 = 10.
So that the ship will not be in danger of hitting the rocks.
The above is the whole calculation process. In fact, in the process of the exam, you can first consider the distance from A to BC and set it as D.
d = 40 sin( 1 15)* cos(35)>40 sin( 150)cos(60)= 10
Because the shortest distance is greater than 10, there is no danger of the ship hitting the rocks.