A Man walks due west for 4km. He then changes directions and walks on a bearing of 197 degree until he is South-west on his starting point. How far is he then from his starting point?

Of course you made a sketch, right?

on mine, I labeled
starting point -- A
end of westerly walk ---- B
end point --- C

In my triangle ABC, I have angle A = 45° (south-west is half way in the 3rd quadrant)
angle B = 107° , (197-90)
then angle C = 28°

by the sine law:
b/sinB = 4/sinC
b/sin107 = 4/sin28
b = 4sin107/sin28 = ..... (you do the button pushing)