\(M=\dfrac{13x^2-x^4-36}{x^3-5x^2+6x}\)
\(=\dfrac{-x^4+13x^2-36}{x\left(x^2-5x+6\right)}\)
\(=\dfrac{-x^4+9x^2+4x^2-36}{x\left(x^2-2x-3x+6\right)}\)
\(=\dfrac{-x^2\left(x^2-9\right)+4\left(x^2-9\right)}{x\cdot\left[x\left(x-2\right)-3\left(x-2\right)\right]}\)
\(=\dfrac{\left(-x^2+4\right)\left(x^2-9\right)}{x\left(x-3\right)\left(x-2\right)}\)
\(=\dfrac{\left(4-x^2\right)\left(x-3\right)\left(x+3\right)}{x\left(x-3\right)\left(x-2\right)}\)
\(=\dfrac{\left(2-x\right)\left(2+x\right)\left(x+3\right)}{x\left(x-2\right)}\)
\(=\dfrac{-\left(x-2\right)\left(2+x\right)\left(x+3\right)}{x\left(x-2\right)}\)
\(=\dfrac{-\left(2+x\right)\left(x+3\right)}{x}\)
\(=\dfrac{-\left(2x+6+x^2+3x\right)}{x}\)
\(=\dfrac{-\left(5x+6+x^2\right)}{x}\)
\(=-\dfrac{5x+6+x^2}{x}\)