First, let's take the time to properly and in a readable manner, present the question:
3.81 An airplane pilot sets a compass course due west and maintains an airspeed of 220 km/h. After flying for 0.500 h, she finds herself over a town 120 km west and 20 km south of her starting point. (a) Find the wind velocity (magnitude and direction). (b) If the wind velocity is 40 km/h due south, in what direction should the pilot set her course to travel due west? Use the same airspeed of 220 km/h.
(a) Let's orient our coordinate axes such that her starting point is at the origin, and her ending point is (-120,-20). If we let $w_x$ be the horizontal (east/west) component of the wind's velocity vector, and $w_y$ be the vertical (north/south) component, then using vector addition, we have:
$$\left\langle -220,0 \right\rangle+\left\langle w_x,w_y \right\rangle=\left\langle -240,-40 \right\rangle$$
Adding like components, we obtain:
$$-220+w_x=-240\implies w_x=-20$$
$$0+w_y=-40\implies w_y=-40$$
Hence, for the wind's velocity we find:
Magnitude:
$$|w|=\sqrt{w_x^2+w_y^2}=\sqrt{(-20)^2+(-40)^2}=20\sqrt{5}\text{ km/h}$$
Direction:
Since both components are negative, we know the angle is in the third quadrant, and so we may use:
$$\theta=\text{W}\,\frac{180}{\pi}\tan^{-1}\left(2\right)\,\text{S}\approx\text{W}\,63.435^{\circ}\,\text{S}$$
(b) Let's let $a_x$ and $a_y$ be the horizontal and vertical components of the pilot's airspeed vector. We may then write:
$$\left\langle a_x,a_y \right\rangle+\left\langle 0,-40 \right\rangle=\left\langle x,0 \right\rangle$$
And this implies:
$$a_x+0=x\implies a_x=x$$
$$a_y-40=0\implies a_y=40$$
We also know:
$$220^2=a_x^2+a_y^2=x^2\implies x=-220$$
And so her direction must be:
$$\theta=\text{W}\,\frac{180}{\pi}\tan^{-1}\left(\frac{2}{11}\right)\,\text{N}\approx\text{W}\,10.305^{\circ}\,\text{N}$$