\(x^2-7x+1=x^2-6x+9-x+3-11\)
\(=\left(x-3\right)^2-\left(x-3\right)-11\)
\(=\left(x-3\right)\left(x-2\right)-11\)
\(\Rightarrow x^2-7x+1⋮x-3\)
\(\Leftrightarrow\left(x-3\right)\left(x-2\right)-11⋮x-3\Leftrightarrow-11⋮x-3\)
\(\Leftrightarrow x-3\inƯ\left(-11\right)=\left\{1;-1;11;-11\right\}\)
\(\Leftrightarrow x\in\left\{4;2;14;-8\right\}\)
...