Just for kicks, let's do it this way. Let's use a coordinate system so you can see what is going on. Like in surveying.
Let's say the coordinate of A is (0,0).
Then, to the turning point, it is 30 km at an azimuth of 120 degrees.
(Technically, this is an azimuth, not a bearing. But, it doesn't really matter).
Those are the coordinates of the turning point, (25.98,-15)
Next, the boat turns 80 degrees from north and goes 50 km to go to B.
B's coordinates are
The coordinates of B are (75.22, -6.32).
Now, to find the distance back to A where it started, just use ol' Pythagoras.
To find the bearing back to A, one way of many:
Here is a diagram so you can see. It is rather sloppy done in paint, but I hope it will suffice.