a) \(-7x+x\left(x+6\right)=42\)
\(\Leftrightarrow-7x+x^2+6x=42\)
\(\Leftrightarrow x^2-x-42=0\)
\(\Leftrightarrow x^2-7x+6x-42=0\)
\(\Leftrightarrow x\left(x-7\right)+6\left(x-7\right)=0\)
\(\Leftrightarrow\left(x-7\right)\left(x+6\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x-7=0\\x+6=0\end{matrix}\right.\)
\(\Leftrightarrow\left[{}\begin{matrix}x=7\\x=-6\end{matrix}\right.\)
b) \(x^3+x-5x^2=5\)
\(\Leftrightarrow x^3+x-5x^2-5=0\)
\(\Leftrightarrow x^3-5x^2+x-5=0\)
\(\Leftrightarrow x^2\left(x-5\right)+\left(x-5\right)=0\)
\(\Leftrightarrow\left(x-5\right)\left(x^2+1\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x-5=0\\x^2+1=0\left(loại\right)\end{matrix}\right.\)
\(\Leftrightarrow x=5\)