\(ĐK:x\ne1\)
\(B=\left(\frac{x^2+2}{x^3-1}+\frac{x}{x^2+x+1}-\frac{1}{x-1}\right):\frac{x-1}{2}=\left(\frac{x^2+2}{x^3-1}+\frac{x^2-x}{\left(x^2+x+1\right)\left(x-1\right)}-\frac{x^2+x+1}{\left(x-1\right)\left(x^2+x+1\right)}\right):\frac{x-1}{2}=\left(\frac{x^2+x^2-x-x^2-x-1+2}{x^3-1}\right):\frac{x-1}{2}=\frac{x^2-2x+1}{x^3-1}:\frac{\left(x-1\right)}{2}=\frac{\left(x-1\right)^2}{\left(x-1\right)\left(x^2+x+1\right)}.\frac{2}{x-1}=\frac{2\left(x-1\right)^2}{\left(x-1\right)^2\left(x^2+x+1\right)}=\frac{2}{x^2+x+1}\)