a: \(=\dfrac{2x+1-x^2-5}{\left(x-1\right)\left(x-2\right)}+\dfrac{-x-1+x^2+x}{x-1}\)
\(=\dfrac{-x^2+2x-4}{\left(x-1\right)\left(x-2\right)}+\dfrac{x^2-1}{x-1}\)
\(=\dfrac{-x^2+2x-4+x^3-2x^2-x+2}{\left(x-1\right)\left(x-2\right)}\)
\(=\dfrac{x^3-3x^2+x-2}{\left(x-1\right)\left(x-2\right)}\)
b: Để A là số nguyên thì \(x^3-3x^2+2x-x-2⋮\left(x-1\right)\left(x-2\right)\)
=>x+2 chia hết cho (x-1)(x-2)
=>x^2+3x+2 chia hết cho x^2-3x+2
=>x^2+2-3x+6x chia hết cho x^2-3x+2
=>6x chia hết cho x^2-3x+2
=>6 chia hết cho x^2-3x+2
=>\(x^2-3x+2\in\left\{1;-1;2;-2;3;-3;6;-6\right\}\)
hay \(x\in\left\{0;4;-1\right\}\)