p = speed of the plain in still air
w = speed of the wind
when going headwind, the plane is not really going "p" fast, is really going slower, is going "p - w", because the wind is subtracting speed from it, likewise, when going with the wind the plane is not going "p" fast, is really going faster, is going "p + w", because the wind is adding its speed to it.
we also know that on the way over he flew 2000 miles and on the way back he flew again the same 2000 miles back.
![{\Large \begin{array}{llll} \underset{distance}{d}=\underset{rate}{r} \stackrel{time}{t} \end{array}} \\\\[-0.35em] ~\dotfill\\\\ \begin{array}{lcccl} &\stackrel{miles}{distance}&\stackrel{mph}{rate}&\stackrel{hours}{time}\\ \cline{2-4}&\\ \textit{against the wind}&2000&p-w&10\\ \textit{with the wind}&2000&p+w&8 \end{array}\hspace{3.5em} \begin{cases} 2000=(p-w)(10)\\\\ 2000=(p+w)(8) \end{cases} \\\\[-0.35em] ~\dotfill](https://img.qammunity.org/2024/formulas/mathematics/college/waqbxq30o887z63lh09yew9p54z9scjt70.png)
