let's recall that d = rt, distance = rate * time.
a = speed of the airplane in still air.
w = speed of the wind
the distance travelled with the wind is 960 miles, so the return trip is pretty much just that, 960 miles.
when the airplane is going with with wind, the airplane is really not going as fast as "a" mph, is really going faster due to the wind, so the speed of the plane is "a + w", because the wind is adding its speed to it.
when the airplane is going against the wind is not really going "a" mph fast either, is really going slower at "a - w" mph, because the wind is subtracting speed from it, so