### Theory:

1. Consider the standard identity I, $$(a+b)^3$$$$=$$$$a^3+3a^2b$$$$+3ab^2+b^3$$.

${\left(a+b\right)}^{3}={a}^{3}+{b}^{3}+3{a}^{2}b+3a{b}^{2}$

Take the factor $$3ab$$ from the last two terms of RHS.

${\left(a+b\right)}^{3}={a}^{3}+{b}^{3}+3\mathit{ab}\left(a+b\right)$

Keep the required $$a^3+b^3$$ in one side and the remaining in other side.

${a}^{3}+{b}^{3}={\left(a+b\right)}^{3}-3\mathit{ab}\left(a+b\right)$

Taking the common factor $$(a+b)$$ outside.

${a}^{3}+{b}^{3}=\left(a+b\right)\left[{\left(a+b\right)}^{2}-3\mathit{ab}\right]$

${a}^{3}+{b}^{3}=\left(a+b\right)\left[{a}^{2}+2\mathit{ab}+{b}^{2}-3\mathit{ab}\right]$

${a}^{3}+{b}^{3}=\left(a+b\right)\left({a}^{2}-\mathit{ab}+{b}^{2}\right)$

2. Consider the standard identity II, $$(a-b)^3$$$$=$$$$a^3-3a^2b$$$$+3ab^2-b^3$$.

${\left(a-b\right)}^{3}={a}^{3}-{b}^{3}+3{a}^{2}b-3a{b}^{2}$

Take the factor $$3ab$$ from the last two terms of RHS.

${\left(a-b\right)}^{3}={a}^{3}-{b}^{3}+3\mathit{ab}\left(a-b\right)$

Keep the required $$a^3-b^3$$ in one side and the remaining in other side.

${a}^{3}-{b}^{3}={\left(a-b\right)}^{3}+3\mathit{ab}\left(a-b\right)$

Taking the common factor $$(a-b)$$ outside.

${a}^{3}-{b}^{3}=\left(a-b\right)\left[{\left(a-b\right)}^{2}+3\mathit{ab}\right]$

${a}^{3}-{b}^{3}=\left(a-b\right)\left[{a}^{2}-2\mathit{ab}+{b}^{2}+3\mathit{ab}\right]$

${a}^{3}-{b}^{3}=\left(a-b\right)\left({a}^{2}+\mathit{ab}+{b}^{2}\right)$