a) \(\dfrac{A}{x-2}=\dfrac{x^2+3x+2}{x^2-4}\)
\(\Leftrightarrow\dfrac{A}{x-2}=\dfrac{\left(x+2\right)\left(x+1\right)}{\left(x-2\right)\left(x+2\right)}\)
\(\Leftrightarrow\dfrac{A}{x-2}=\dfrac{x+1}{x-2}\Leftrightarrow A=x+1\)
b) \(\dfrac{M}{x-1}=\dfrac{x^2+3x+2}{x+1}\)
\(\Leftrightarrow\dfrac{M}{x-1}=\dfrac{\left(x+1\right)\left(x+2\right)}{x+1}\)
\(\Leftrightarrow\dfrac{M}{x-1}=x+2\Leftrightarrow M=\left(x-1\right)\left(x+2\right)=x^2+x-2\)