\(\Leftrightarrow2\left(x+5\right)-x\left(x+5\right)=0\\ \Leftrightarrow\left(2-x\right)\left(x+5\right)=0\\ \Leftrightarrow\left[{}\begin{matrix}x=2\\x=-5\end{matrix}\right.\)
\(2\left(x+5\right)-x^2-5x=0\\ =2\left(x+5\right)-x\left(x+5\right)=0\\ =\left(x+5\right)\left(2-x\right)=0\\ \Rightarrow\left[{}\begin{matrix}x+5=0\\2-x=0\end{matrix}\right.\\ \Rightarrow\left[{}\begin{matrix}x=-5\\x=2\end{matrix}\right.\)