a) ta có : \(M=\frac{x+2}{x+3}-\frac{5}{x^2+x-6}+\frac{1}{2-x}\)\(=\frac{x+2}{x+3}+\frac{5}{\left(x+3\right)\left(2-x\right)}+\frac{1}{2-x}\)
\(=\frac{\left(x+2\right)\left(2-x\right)}{\left(x+3\right)\left(2-x\right)}+\frac{5}{\left(x+3\right)\left(2-x\right)}+\frac{1\left(x+3\right)}{\left(x+3\right)\left(2-x\right)}\)
\(=\frac{-x^2+4+5+x+3}{\left(x+3\right)\left(2-x\right)}\) \(=\frac{-x^2+x+12}{\left(x+3\right)\left(2-x\right)}\)
\(=\frac{\left(4-x\right)\left(x+3\right)}{\left(x+3\right)\left(2-x\right)}\) = \(\frac{4-x}{2-x}\)