\(P=\dfrac{x\left(x+1\right)}{\left(x-1\right)^2}:\left(\dfrac{\left(x+1\right)\left(x-1\right)}{x\left(x-1\right)}+\dfrac{x}{x\left(x-1\right)}+\dfrac{2-x^2}{x\left(x-1\right)}\right)\)
\(=\dfrac{x\left(x+1\right)}{\left(x-1\right)^2}:\left(\dfrac{x^2-1+x+2-x^2}{x\left(x-1\right)}\right)=\dfrac{x\left(x+1\right)}{\left(x-1\right)^2}:\left(\dfrac{x+1}{x\left(x-1\right)}\right)\)
\(=\dfrac{x\left(x+1\right).x\left(x-1\right)}{\left(x+1\right)\left(x-1\right)^2}=\dfrac{x^2}{x-1}\)
\(=\dfrac{x^2-1+1}{x-1}=\dfrac{\left(x-1\right)\left(x+1\right)+1}{x-1}=x+1+\dfrac{1}{x-1}\)
\(=x-1+\dfrac{1}{x-1}+2\ge2\sqrt{\left(x-1\right).\dfrac{1}{x-1}}+2=4\)
\(P_{min}=4\) khi \(x-1=\dfrac{1}{x-1}\Leftrightarrow x=2\)