a: \(=\dfrac{x^2-5x+x+4}{x\left(x-2\right)}=\dfrac{x^2-4x+4}{x\left(x-2\right)}=\dfrac{x-2}{x}\)
b: \(=\dfrac{x^2-6x+9+4x^2+8x-4x^2-8x}{\left(x-3\right)\left(x+2\right)}\)
\(=\dfrac{x-3}{x+2}\)
a) \(=\dfrac{x\left(x-5\right)+x+4}{x\left(x-2\right)}=\dfrac{x^2-4x+4}{x\left(x-2\right)}=\dfrac{\left(x-2\right)^2}{x\left(x-2\right)}=\dfrac{x-2}{x}\)
b) \(=\dfrac{\left(x-3\right)^2+4x\left(x+2\right)-8x-4x^2}{\left(x+2\right)\left(x-3\right)}=\dfrac{x^2-6x+9+4x^2+8x-8x-4x^2}{\left(x+2\right)\left(x-3\right)}\)
\(=\dfrac{x^2-6x+9}{\left(x+2\right)\left(x-3\right)}=\dfrac{\left(x-3\right)^2}{\left(x+2\right)\left(x-3\right)}=\dfrac{x-3}{x+2}\)