\(5\left(x+2\right)-x^2-2x=0\)
\(\Rightarrow5\left(x+2\right)-\left(x^2+2x\right)=0\)
\(\Rightarrow5\left(x+2\right)-x\left(x+2\right)=0\)
\(\Rightarrow\left(5-x\right)\left(x+2\right)=0\)
\(\Rightarrow\orbr{\begin{cases}5-x=0\\x+2=0\end{cases}}\)\(\Rightarrow\orbr{\begin{cases}x=5\\x=-2\end{cases}}\)