With the wind, the plane's speed was (972 mi)/(9 h) = 108 mi/h.
Against the wind, the plane's speed was (972 mi)/(18 h) = 54 mi/h.
The speed of the plane in still air is the average of these speeds, 81 mi/h.
The speed of the wind is half the difference of the trip speeds, 27 mi/h.