Let denote the speed of the air-plane through still air and the speed of the wind.
Speed of the air-plane and tail wind add up to the resulting speed; the difference between the speed of the air-plane and the head wind is the resulting speed on the return flight. Speed is defined by:
You'll get a system of simultaneous equations:
Solve for and . I've got