\(B=\left(\dfrac{x^2+3x+2+6x-9x\left(x+1\right)}{3x\left(x+1\right)}\cdot\dfrac{x+1}{2-4x}\right)-\dfrac{-x^2+3x+1}{3x}\)
\(=\left(\dfrac{x^2+9x+2-9x^2-9x}{3x}\cdot\dfrac{1}{-2\left(2x-1\right)}\right)+\dfrac{x^2-3x-1}{3x}\)
\(=\left(\dfrac{-8x^2+2}{3x}\cdot\dfrac{-1}{2\left(2x-1\right)}\right)+\dfrac{x^2-3x-1}{3x}\)
\(=\dfrac{2\left(2x-1\right)\left(2x+1\right)}{6x\left(2x-1\right)}+\dfrac{x^2-3x-1}{3x}\)
\(=\dfrac{2x+1-x^2-3x-1}{3x}=\dfrac{-x^2+x}{3x}=\dfrac{-x+1}{3}\)