hi EbenezerSon

Let's try to get this clear. Bearings are always measured clockwise from North. I have made a diagram (below) with point B on a bearing of x from A

East vector component NB = AB sin(x)

North vector component AN = AB cos(x)

If x is over 90, the sine will still be positive but the cosine will now come out negative.

If x is between 180 and 270, the sine will now be negative and so will the cosine.

If x is over 270, the sine will be negative and the cosine will once more be positive.

Calculators will automatically put the correct sign on the sine and cosine so you can always use these two formulas

Westerly components will automatically come out as negative Easterly and similarly South will be negative North.

So get all the components as Easts and Norths. Adding will always work because the negative signs will cause you to subtract those.

After this you can get the final distance with

and the bearing angle with

Unfortunately, the bearing may not come out correctly from the atan because (for example) atan(1) may be 45 or it may be 225. There is no way the calculator can 'know' which answer to use; so you'll have to look at the diagram to decide on the correct bearing. eg. If you get 45 and you can see the answer should be SouthWest you can correct your answer by adding 180.

In your example

From A to north; vector AN = (10km 000)

From north to east; vector NE = (5km, 000)

From east to the end let say P, therefore: vector EP = (10km, 045).

first stage East = 0 North = 10

second stage East = 5 North = 0

third stage East = 10sin(45) = 7.07 North = 10cos(45) = 7.07

totalE = 12.07 total North = 17.07

distance = root(12.07^2 + 17.07^2) = 20.907....

angle = atan(12.07/17.07 = 35.26....

Bob