The relevant relationship we need to consider is the one between distance, time and speed:
speed = ( distance / time )
The flight west takes 2 hours, and is 180 miles in length, so west speed is easily determined:
Wspeed = 180 miles / 2 hours = 90 mph
Going eastbound, the flight took 1 hour and 12 minutes, which can be re-written as 1.2 hours. The speed when traveling east:
Espeed = 180 miles / 1.2 hours = 150 mph
When the plane encounters a head wind while traveling west, its forward progress is impeded; the plane travels slower. Specifically, we can write an equation describing this effect:
Wspeed = Aspeed - wind
Similarly, when the plane travels east, the tail wind increases the forward speed of the plane:
Espeed = Aspeed + wind
Using the above equations, we can solve for Aspeed, the airplane's speed, and wind, the wind speed.
90 = Aspeed - wind
150 = Aspeed + wind, which we can re-write as wind = 150 - Aspeed.
Substituting the second equation into the first:
90 = Aspeed - ( 150 - Aspeed )
90 = Aspeed - 150 + Aspeed. Adding 150 to both sides:
90 + 150 = Aspeed + Aspeed
240 = 2*Aspeed. Divide both sides by 2:
240 / 2 = 2*Aspeed / 2
120 = Aspeed
Since we know wind = 150 - Aspeed (from our re-written second equation), solving for wind now that we know Aspeed is simple:
wind = 150 - Aspeed = 150 - 120 = 30
So, to answer the original question, the airline's speed is 120 mph, and the wind speed is 30 mph.