Answer:
44.5 km on a bearing of 134.1°
Explanation:
A suitable vector calculator will tell you the location of the ship from port is ...
21∠32° +45∠287° = 44.5∠-45.9°
The bearing of the port is in the reverse direction, so 180° added to this:
180° +(-45.9°) = 134.1°
The distance from port is 44.5 km. The bearing of the port is 134.1°.
_____
Additional comment
The distance from port is perhaps most easily found using the Law of Cosines. It is the third side of a triangle with sides 21 and 45. The included angle is (287° -(180° +32°)) = 75°. The distance is then ...
c = √(a² +b² -2ab·cos(C)) = √(21² +45² -2·21·45·cos(75°)) ≈ √1976.83
≈ 44.5 km
The angle between the 32° bearing and the bearing from the port to the ship can be found using the Law of Sines.
B = arcsin(b/c·sin(C)) = arcsin(45/44.5sin(75°)) ≈ 77.9°
so, the bearing angle from the ship to the port is ...
180° +(32° -77.9°) = 134.1°
__
Bearings are measured clockwise from north. A diagram can be helpful.