a,
Thay $m=-2$ vào phương trình ta được:
$x^2-2.(-2).x-1=0$
$\Leftrightarrow x^2+4x-1=0$
$\Leftrightarrow x^2+4x+4=5$
$\Leftrightarrow (x+2)^2=5$
$\Leftrightarrow \left[ \begin{array}{l}x+2=\sqrt5\\x+2=-\sqrt5\end{array} \right. \Leftrightarrow \left[ \begin{array}{l}x=-2+\sqrt5\\x=-2-\sqrt5\end{array} \right.$
Vậy phương trình có hai nghiệm phân biệt $x_1=-2+\sqrt5$, $x_2=-2-\sqrt5$
b,
$x^2-2mx-1=0$
$\Delta=(-2m)^2-4.(-1)=4m^2+4>0\ \forall m$
$\Rightarrow$ Phương trình luôn có hai nghiệm phân biệt với mọi $m$
Theo định lý viet ta có: $\left\{\begin{matrix}x_1+x_2=-\dfrac ba=2m\\x_1x_2=\dfrac ca=-1\end{matrix}\right.$
Giả thiết:
$x_1^2+x_2^2-x_1x_2=7$
$\Leftrightarrow (x_1^2+2x_1x_2+x_2^2)-3x_1x_2=7$
$\Leftrightarrow (x_1+x_2)^2-3x_1x_2=7$
$\Leftrightarrow (2m)^2-3.(-1)=7$
$\Leftrightarrow 4m^2+3=7$
$\Leftrightarrow m=\pm 1$
Vậy $m=\pm 1$ là giá trị cần tìm