How did people come up with the formula $a^3+b^3=(a+b)(a^2-ab+b^2)$? Every resource that I've read proves the formula
$$ a^3 + b^3 = (a+b)(a^2-ab+b^2) \tag1$$
by just multiplying $(a+b)$ and $(a^2 - ab + b^2)$.
But how did people come up with that formula? Did they think like, "Oh, let's just multiply these polynomials, I don't know why, let's just do it." I don't think that people just pointed a finger at the sky and came up with that formula.
So, how to prove $(1)$?

In this answer I wanted to suggest a method where I get results by applying substitutions (based on the idea that it is the most basic algebraic technique).
Let, $a=m+n$ and $b=m-n$ then:
$$
\begin{aligned}a^3+b^3=m^3+3m^2n+3mn^2+n^3+m^3-3m^2n+3mn^2-n^3=2m^3+6mn^2=2m(m^2+3n^2)\end{aligned}
$$
and note that,
$$
\begin{cases} m+n=a\\m-n=b\end{cases}\implies \begin{cases}m=\frac {a+b}{2}\\n=\frac {a-b}{2}\end{cases}
$$
Putting $m=\frac {a+b}{2}$ and $n=\frac {a-b}{2}$, we have:
$$
\begin{aligned}a^3+b^3&=2m(m^2+3n^2)\\
&=2\times \frac {a+b}{2}\left(\frac {(a+b)^2}{4}+3\times \frac {(a-b)^2}{4}\right)\\
&=(a+b)\left(\frac {(a+b)^2+3(a-b)^2}{4}\right)\end{aligned}
$$
Now, let's open the parentheses and do some basic simplifications:
$$
\begin{aligned}
(a+b)^2+3(a-b)^2&=a^2+2ab+b^2+3(a^2-2ab+b^2)\\
&=a^2+2ab+b^2+3a^2-6ab+3b^2\\
&=4a^2-4ab+4b^2\\
&=4(a^2-ab+b^2)\end{aligned}
$$
Thus, we get the following result:
$$
\begin{aligned}a^3+b^3&=(a+b)\times \frac {4(a^2-ab+b^2)}{4}\\
&=(a+b)(a^2-ab+b^2).\end{aligned}
$$
