\(M=\frac{2a+9}{a+3}-\frac{5a+17}{a+3}-\frac{3a}{a+3}=\frac{2a+9-5a-17-3a}{a+3}=\frac{-6a-8}{a+3}=\frac{-6a-18+10}{a+3}=\frac{10}{a+3}-\frac{6\left(a+3\right)}{a+3}=\frac{10}{a+3}-6\)
\(M\in Z\Leftrightarrow\frac{10}{a+3}\in Z\Leftrightarrow10⋮a+3\Leftrightarrow a+3\in\text{Ư}\left(10\right)=\left\{-10;-5;-2;-1;1;2;5;10\right\}\Leftrightarrow a\in\left\{-13;-8;-5;-4;-2;-1;2;7\right\}\)