P = \(\left(\frac{4}{x}-\frac{2x-4}{x^2-x}\right).\frac{x^2-1}{x+1}\)
P = \(\left(\frac{4}{x}-\frac{2\left(x-2\right)}{x\left(x-1\right)}\right).\frac{\left(x-1\right)\left(x+1\right)}{x+1}\)
P = \(\frac{4\left(x-1\right)-2\left(x-2\right)}{x\left(x-1\right)}.\left(x-1\right)\)
P = \(\frac{4x-4-2x+4}{x\left(x-1\right)}.\left(x-1\right)\)
P = \(\frac{2x\left(x-1\right)}{x\left(x-1\right)}=2\)