\(3x\left(x+2\right)=\left(x+2\right)^2\\ \Leftrightarrow3x\left(x+2\right)-\left(x+2\right)^2=0\\ \Leftrightarrow\left(x+2\right)\left(3x-x-2\right)=0\\ \Leftrightarrow\left(x+2\right)\left(2x-2\right)=0\\ \Leftrightarrow\left[{}\begin{matrix}x+2=0\\2x-2=0\end{matrix}\right.\\ \Leftrightarrow\left[{}\begin{matrix}x=-2\\x=1\end{matrix}\right.\)
Vậy phương trình có tập nghiệm là: \(S=\left\{-2;1\right\}\)
\(3x\left(x+2\right)=\left(x+2\right)^2\\ \Leftrightarrow3x\left(x+2\right)=\left(x+2\right)\left(x+2\right)\\ \Leftrightarrow3x\left(x+2\right)-\left(x+2\right)\left(x+2\right)=0\\ \Leftrightarrow\left(x+2\right)\left(3x-\left(x+2\right)\right)=0\\ \Leftrightarrow\left(x+2\right)\left(3x-x-2\right)=0\\ \Leftrightarrow\left(x+2\right)\left(2x-2\right)=0\\ \Leftrightarrow\left[{}\begin{matrix}x+2=0\\2x-2=0\end{matrix}\right.\\ \Leftrightarrow\left[{}\begin{matrix}x=-2\\2x=2\end{matrix}\right.\\ \Leftrightarrow\left[{}\begin{matrix}x=-2\\x=1\end{matrix}\right.\)
Vậy : \(S=\left\{-2,1\right\}\)