Ta có : \(x^2-x=y^2-y\)
\(\Leftrightarrow x^2-x-y^2+y=0\)
\(\Leftrightarrow x^2-y^2-\left(x-y\right)=0\)
\(\Leftrightarrow\left(x-y\right)\left(x+y\right)-\left(x-y\right)=0\)
\(\Leftrightarrow\left(x-y\right)\left(x+y-1\right)=0\)
Do \(x;y\) khác nhau
\(\Rightarrow x-y\ne0\)
\(\Rightarrow x+y-1=0\)
\(\Rightarrow x+y=1\)
Lại có : \(B=x^3+y^3+3xy\left(x^2+y^2\right)+6x^2y^2\left(x+y\right)\)
\(=\left(x+y\right)\left(x^2-xy+y^2\right)+3xy\left(x^2+y^2\right)+6x^2y^2\)
\(=x^2-xy+y^2+3xy\left(x^2+y^2+2xy\right)\)
\(=x^2-xy+y^2+3xy\left(x+y\right)^2\)
\(=x^2-xy+y^2+3xy\)
\(=x^2+2xy+y^2\)
\(=\left(x+y\right)^2\)
\(=1\)
Vậy \(B=1\)