Xét pt:\(x^2-x\left(m-1\right)-2=0\)
Có \(\Delta=\left(m-1\right)^2+8>0\)
Theo hệ thức vi-ét ta có:\(\left\{{}\begin{matrix}x_1+x_2=m-1\\x_1x_2=-2\end{matrix}\right.\)
Đặt \(A=\frac{x_1^2-2}{x_1-1}\cdot\frac{x_2^2-2}{x_2-1}\)
\(A=\frac{\left(x_1^2+x_1x_2\right)\left(x_2^2+x_1x_2\right)}{\left(x_1-1\right)\left(x_2-1\right)}\)
\(A=\frac{-2\left(m-1\right)^2}{-m}=\frac{2\left(m-1\right)^2}{m}\)
A=4\(\Leftrightarrow\frac{2\left(m-1\right)^2}{m}=4\)
\(\Leftrightarrow m^2-4m+1=0\)
\(\Leftrightarrow\left[{}\begin{matrix}m=2+\sqrt{3}\\m=2-\sqrt{3}\end{matrix}\right.\)