the wind speed when robin travel from Santa to san Francisco is 40
the wind speed when robin travel from San Francisco to Santa is 20
let the airspeed of the plane is x
when he travels from Santa to san Francisco, the relative airspeed of the plane is x-40
when he travels from San Francisco to Santa, the relative airspeed of the plane is x+20
it is known that the distance between santa and san francisco is contant
so the distance travel by robin will be the same
robin takes 3hr when flies Santa to san Francisco and takes 2 hrs from san Francisco to santa.
so the distance is
3(x-40) = 2(x+20)
3x - 120 = 2x + 40
3x - 2x = 120 + 40
x = 160
sot the air speed of the plane is 160 mph