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