Plane A is flying at 400 mph in the northeast direction relative to the earth. Plane B is flying at 500 mph in the north direction relative to the earth. What is the speed of Plane B as observed from Plane A?

the answer is 357 mph, but i do not understand how to find this.