Giải:
Ta có: \(a\in B\left(b\right)\)
\(\Rightarrow a=bm\left(m\in Z\right)\left(1\right)\)
Lại có: \(b\in B\left(a\right)\)
\(\Rightarrow b=an\left(n\in Z\right)\left(2\right)\)
Từ \(\left(1\right)\) và \(\left(2\right)\)
\(\Rightarrow a\div m=an\)
\(\Rightarrow1\div m=n\)
Mà \(n\in Z\Rightarrow\left[\begin{matrix}m=1\\m=-1\end{matrix}\right.\)
\(\Rightarrow\left\{\begin{matrix}m=1\Rightarrow a=b\\m=-1\Rightarrow a=-b\end{matrix}\right.\)
Vậy nếu \(a,b\ne0;a\in B\left(b\right);b\in B\left(a\right)\Rightarrow\left[\begin{matrix}a=b\\a=-b\end{matrix}\right.\) (Đpcm)