If a pilot wants to travel 400 mph at a bearing of 80, what should he set his speed and bearing to counteract a wind blowing at 50 mph coming directly from South?

1 answer

"bearings" to indicate direction is often misunderstood so you should stick with the conventional method used in trigonometry
I will use vectors, so ...

(400cos10° , 400sin10°) = R + (50cos90° , 50sin90°)
where R is the required vector
(393.923, 69.459) = (x,y) + (0, 50)
R = (x,y) = (393.923 , 19.459)

|R| = √(393.923^2 + 19.459^2) = appr 394.4 mph

direction angle θ :
tanθ = 19.459/393.923
θ = appr 2.8°

so his bearing should be 87.2°

check my arithmetic