\(x^2-3x=1\Leftrightarrow x^2-3x-1=0\)
Theo Vi - ét, ta có :
\(\left\{{}\begin{matrix}x_1+x_2=-\dfrac{b}{a}=1\\x_1x_2=\dfrac{c}{a}=-1\end{matrix}\right.\)
\(A=\left(x_1-x_2\right)^2=\left(x_1+x_2\right)^2-4x_1x_2\)
\(=1^2-4.\left(-1\right)\)
\(=5\)
\(B=\dfrac{x_1}{x_2}+\dfrac{x_2}{x_1}=\dfrac{x_1^2+x_2^2}{x_1x_2}=\dfrac{\left(x_1+x_2\right)^2-2x_1x_2}{x_1x_2}=\dfrac{1^2-2.\left(-1\right)}{\left(-1\right)}=-4\)