a: \(P=\left(\dfrac{x}{\left(x-5\right)\left(x+5\right)}-\dfrac{x-5}{x\left(x+5\right)}\right)\cdot\dfrac{x\left(x+5\right)}{2x-5}+\dfrac{x^2}{5-x}\)
\(=\dfrac{x^2-x^2+10x-25}{\left(x-5\right)\left(x+5\right)}\cdot\dfrac{x\left(x+5\right)}{2x-5}-\dfrac{x^2}{x-5}\)
\(=\dfrac{5\left(2x-5\right)\cdot x}{\left(x-5\right)\left(2x-5\right)}-\dfrac{x^2}{x-5}=\dfrac{5x-x^2}{x-5}=-x\)
b: Để P là số nguyên thì x là số nguyên