Initially its moving with tail wind so here the speed of wind will support the motion of the plane
so we can say
[tex]V_{plane} + v_{wind} = \frac{distance}{time}[/tex]
[tex]V_{plane} + v_{wind} = \frac{1800}{9}[/tex]
[tex]V_{plane} + v_{wind} = 200 mph[/tex]
now when its moving with head wind we can say that wind is opposite to the motion of the plane
[tex]V_{plane} - v_{wind} = \frac{distance}{time}[/tex]
[tex]V_{plane} - v_{wind} = \frac{1800}{12}[/tex]
[tex]V_{plane} - v_{wind} = 150mph[/tex]
now by using above two equations we can find speed of palne as well as speed of wind
[tex]V_{plane} = 175 mph[/tex]
[tex]v_{wind} = 25 mph[/tex]