\(\left(x+2\right)^3+\left(\frac{x+2}{x+1}\right)^3=16\)
\(\left(x+2\right)^3+\left(\frac{x+2}{x+1}\right)^3=2^3+2^3\)
\(\Rightarrow\)\(\left\{{}\begin{matrix}\left(x+2\right)^3=2^3\\\left(\frac{x+2}{x+1}\right)^3=2^3\end{matrix}\right.\)
\(\Rightarrow\left\{{}\begin{matrix}x+2=2\\\frac{x+2}{x+1}=2\end{matrix}\right.\)
\(\Rightarrow\left\{{}\begin{matrix}x=0\\x=0\end{matrix}\right.\rightarrow x=0}\)