\(\left[\left(1+\frac{1}{x^2}\right)\div\left(1+2x+x^2\right)+\frac{2}{\left(x+1\right)^3}\times\left(1+\frac{1}{x}\right)\right]\div\frac{x-1}{x^3}\)
\(=\left[\frac{x^2+1}{x^2}\times\frac{1}{\left(x+1\right)^2}+\frac{2}{\left(x+1\right)^3}\times\frac{x+1}{x}\right]\div\frac{x-1}{x^3}\)
\(=\left(\frac{x^2+1}{x^2}\times\frac{1}{\left(x+1\right)^2}+\frac{1}{\left(x+1\right)^2}\times\frac{2}{x}\right)\div\frac{x-1}{x^3}\)
\(=\left(\frac{1}{\left(x+1\right)^2}\times\left(\frac{x^2+1}{x^2}+\frac{2}{x}\right)\right)\div\frac{x-1}{x^3}\)
\(=\left(\frac{1}{\left(x+1\right)^2}\times\frac{x^3+2x^2+x}{x^3}\right)\div\frac{x-1}{x^3}\)
\(=\left(\frac{1}{\left(x+1\right)^2}\times\frac{x\left(x^2+2x+1\right)}{x^3}\right)\div\frac{x-1}{x^3}\)
\(=\left(\frac{1}{\left(x+1\right)^2}\times\frac{x\left(x+1\right)^2}{x^3}\right)\div\frac{x-1}{x^3}\)
\(=\frac{1}{x^2}\times\frac{x^3}{x-1}\)
\(=\frac{x}{x-1}\)