a) Ta có: \(P=\dfrac{x-2}{x^2-1}-\dfrac{x+2}{x^2+2x+1}\cdot\dfrac{1-x^2}{2}\)
\(=\dfrac{x-2}{\left(x-1\right)\left(x+1\right)}-\dfrac{x+2}{\left(x+1\right)^2}\cdot\dfrac{-\left(x-1\right)\left(x+1\right)}{2}\)
\(=\dfrac{x-2}{\left(x-1\right)\left(x+1\right)}+\dfrac{\left(x+2\right)\left(x-1\right)}{2\left(x+1\right)}\)
\(=\dfrac{2\left(x-2\right)}{2\left(x-1\right)\left(x+1\right)}+\dfrac{\left(x-1\right)^2\cdot\left(x+2\right)}{2\left(x-1\right)\left(x+1\right)}\)
\(=\dfrac{2x-4-\left(x^2-2x+1\right)\left(x+2\right)}{2\left(x-1\right)\left(x+1\right)}\)
\(=\dfrac{2x-4-\left(x^3+2x^2-2x^2-4x+x+2\right)}{2\left(x-1\right)\left(x+1\right)}\)
\(=\dfrac{2x-4-\left(x^3-3x+2\right)}{2\left(x-1\right)\left(x+1\right)}\)
\(=\dfrac{2x-4-x^3+3x-2}{2\left(x-1\right)\left(x+1\right)}\)
\(=\dfrac{-x^3+5x-6}{2\left(x-1\right)\left(x+1\right)}\)
\(=\dfrac{-\left(x^3-5x+6\right)}{2\left(x-1\right)\left(x+1\right)}\)