\(M=\frac{x^2-5}{x^2-2}\in Z\)
\(\Rightarrow x^2-5⋮x^2-2\)
\(\Rightarrow x^2-2-3⋮x^2-2\)
\(\Rightarrow3⋮x^2-2\)
\(\Rightarrow x^2-2\inƯ\left(3\right)\)
\(\Rightarrow x^2-2\in\left\{-3;-1;1;3\right\}\)
\(\Rightarrow x^2\in\left\{-1;1;3;5\right\}\)
\(x\in Z\)
=> x = 1