\(\left(a+b+c\right)^3=\left[\left(a+b\right)+c\right]^3\)
\(=\left(a+b\right)^3+3\left(a+b\right)^2.c+3\left(a+b\right).c^2+c^3\)
\(=a^3+b^3+3ab\left(a+b\right)+3\left(a+b\right)^2.c+3\left(a+b\right).c^2-c^3\)
\(=a^3+b^3+c^3+3\left(a+b\right)\left[ab+\left(a+b\right)c+c^2\right]\)
\(=a^3+b^3+c^3+3\left(a+b\right)\left(c^2+ab+ac+bc\right)\)
\(=a^3+b^3+c^3+3\left(a+b\right)\left[\left(c^2+bc\right)+\left(ab+ac\right)\right]\)
\(=a^3+b^3+c^3+3\left(a+b\right)\left[c\left(c+b\right)+a\left(b+c\right)\right]\)
\(=a^3+b^3+c^3+3\left(a+b\right)\left(b+c\right)\left(c+a\right)\)