recall your d = rt, distance = rate * time.
p = speed of the plane
w = speed of the wind
let's keep in mind that, when the plane is going with the wind, is not really going "p" fast is actually going "p + w" since the wind is adding speed to it, likewise, when the plane is going against the wind, the plane is going "p - w" fast, since the wind is subtracting speed from it.

