\(P=a^3+b^3+3ab\\ =\left(a+b\right)^3-3ab\left(a+b\right)+3ab\\ =\left(a+b\right)^3-\left[3ab\left(a+b\right)-3ab\right]\\ =\left(a+b\right)^3-3ab\left(a+b-1\right)\\ Thay\text{ }a+b=1,ta\text{ }được:\\P =1^3-3ab\left(1-1\right)=1\)
\(P=a^3+b^3+3ab=\left(a+b\right)\left(a^2-ab+b^2\right)+3ab\)
\(=a^2-ab+b^2+3ab=a^2+2ab+b^2=\left(a+b\right)^2=1^2=1\)