\(B=\left(\frac{2x}{x-3}-\frac{x-1}{x+3}+\frac{x^2+1}{9-x^2}\right):\left(1-\frac{x-1}{x+3}\right)\left(ĐK:x\ne\pm3\right)\)
\(=\frac{2x\left(x+3\right)-\left(x-1\right)\left(x-3\right)-x^2-1}{x^2-9}:\frac{x+3-x+1}{x+3}\)
\(=\frac{2x^2+6x-x^2+3x+x-3-x^2-1}{\left(x-3\right)\left(x+3\right)}\cdot\frac{x+3}{4}\)
\(=\frac{10x-4}{\left(x-3\right)\left(x+3\right)}\cdot\frac{x+3}{4}=\frac{10x-4}{4\left(x-3\right)}\)
\(B=\left(\frac{2x}{x-3}-\frac{x+1}{x+3}+\frac{x^2+1}{9-x^2}\right):\left(1-\frac{x-1}{x+3}\right)\)
\(=\left[\frac{2x\left(x+3\right)}{\left(x-3\right)\left(x+3\right)}-\frac{\left(x+1\right)\left(x-3\right)}{\left(x-3\right)\left(x+3\right)}-\frac{x^2+1}{\left(x-3\right)\left(x+3\right)}\right]:\left(\frac{x+3-x+1}{x+3}\right)\)
\(=\left(\frac{2x^2+6x-x^2+3x-x+3-x^2-1}{\left(x+3\right)\left(x-3\right)}\right):\frac{4}{x+3}\)
\(=\frac{8x-1}{\left(x+3\right)\left(x-3\right)}.\frac{x+3}{4}\)\(=\frac{8x-1}{4\left(x-3\right)}\)