Từ \(a^2-ab-2b^2=0\)
\(\Rightarrow a^2+ab-2b^2-2ab=0\)
\(\Rightarrow a\left(a+b\right)-2b\left(a+b\right)=0\)
\(\Rightarrow\left(a-2b\right)\left(a+b\right)=0\)
\(\Rightarrow\left[\begin{array}{nghiempt}a-2b=0\\a+b=0\end{array}\right.\)\(\Rightarrow\left[\begin{array}{nghiempt}a=2b\\a=-b\end{array}\right.\)
Xét \(a=2b\) thì \(B=\frac{a+b}{a-b}=\frac{2b+b}{2b-b}=\frac{3b}{b}=3\)Xét \(a=-b\) thì \(B=\frac{\left(-b\right)+b}{\left(-b\right)-b}=\frac{0}{\left(-b\right)-b}=0\)