\(x\left(x+5\right)\left(x-5\right)-\left(x+2\right)\left(x^2-2x+4\right)=42\)
\(\Leftrightarrow x\left(x^2-25\right)-\left(x^3+8\right)=42\)
\(\Leftrightarrow x^3-25x-x^3-8=42\)
\(\Leftrightarrow-25x-8=42\)
\(\Leftrightarrow-25x=42+8\)
\(\Leftrightarrow-25x=50\)
\(\Leftrightarrow x=-\dfrac{50}{25}=-2\)