\(\left(x-1\right)^{x+2}=\left(x-1\right)^{x+4}\)
\(+\text{Nếu }x-1=0\Leftrightarrow x=1\text{ thì pt thành }0=0\text{ (thỏa mãn)}\)
\(\text{+Xét }x-1\ne0\Leftrightarrow x\ne1\)
\(pt\Leftrightarrow\left(x-1\right)^{x+4-\left(x+2\right)}=1\Leftrightarrow\left(x-1\right)^2=1=1^2=\left(-1\right)^2\)
\(\Leftrightarrow x-1=1\text{ hoặc }x-1=-1\)
\(\Leftrightarrow x=2\text{ hoặc }x=0\)
Kết luận: \(x\in\left\{0;1;2\right\}\)