a) \(\left(x+2\right)^3-x^2\left(x+6\right)=-4\)
\(x^3+6x^2+12x+8-x^3-6x^2+4=0\)
\(12x+12=0\)
\(x=-1\)
b) \(\left(x-3\right)^2-5x+15=0\)
\(\left(x-3\right)^2-5\left(x-3\right)=0\)
\(\left(x-3\right)\left(x-3-5\right)=0\)
\(\left(x-3\right)\left(x-8\right)=0\)
\(\Rightarrow\left[{}\begin{matrix}x-3=0\\x-8=0\end{matrix}\right.\Rightarrow\left[{}\begin{matrix}x=3\\x=8\end{matrix}\right.\)