How does $(x+h)^3 = x^3 + 3x^2h + 3xh^2 + h^3$? Good afternoon my wonderful friends!
Whenever I do this equation I set it up using the difference of two cubes, which is as follows:
$(a+b)^3 = (a+b)(a^2-ab+b^2) = a^3 + b^3$
Whenever I try to use this formula  I always get:
$(x+h) x^2  - xh + h^2$

Simplify:

$x^3 - x^2h + h^2x + x^2h - xh^2 + h^3$
Simplify:

x^3 + h^3$
I don't understand were the three's come from in the final answer: $(x+h)^3 = x^3 + 3x^2h + 3xh^2 + h^3$

$$(a+b)^3 \neq a^3 + b^3$$
for example for $a=1$ and $b=1$ you get $(a+b)^3=(1+1)^3=2^3=8 \neq 2 = 1^3 + 1^3 = a^3 + b^3$
To evaluate $(a+b)^n$ one can use the property of the Pascal's triangle

in your case:
$$(a+b)^3 = (a+b)*(a+b)*(a+b)=(a^2 + ab + ab + b^2) * (a+b)=$$
$$(a^2 + 2ab + b^2)* (a+b) = a^3 + a^2b + 2a^2b + 2ab^2 + b^2a+ b^3 = $$
$$1a^2 + 3a^2b + 3ab^2 + 1b^3$$
You can look at the Pascal's triangle in line 4 (where you have $n = 3$) and see what the coefficient of your expanded polynomial are. You will see that are exactly $1,3,3,1$
I.e. for $n=4$, line $5$ We have the coefficients $1,4,6,4,1$ and indeed $(a+b)^4 = 1a^4 + 4 a^3b + 6a^2b^2 + 4ab^3 + 1b^4$
