a. Em tự giải
b.
\(\left\{{}\begin{matrix}mx+y=2m\\x+my=m+1\end{matrix}\right.\) \(\Leftrightarrow\left\{{}\begin{matrix}m^2x+my=2m^2\\x+my=m+1\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}\left(m^2-1\right)x=2m^2-m-1\\y=-mx+2m\end{matrix}\right.\)
Hệ có nghiệm duy nhất khi \(m^2-1\ne0\Rightarrow m\ne\pm1\)
Khi đó: \(\left\{{}\begin{matrix}\left(m-1\right)\left(m+1\right)x=\left(m-1\right)\left(2m+1\right)\\y=-mx+2m\end{matrix}\right.\)
\(\Rightarrow\left\{{}\begin{matrix}x=\dfrac{2m+1}{m+1}\\y=\dfrac{m}{m+1}\end{matrix}\right.\)
\(2x-4y=\dfrac{4m+2}{m+1}-\dfrac{4m}{m+1}=\dfrac{2}{m+1}\)
\(2x-4y\in Z\Rightarrow m+1=Ư\left(2\right)\)
\(\Rightarrow m+1=\left\{-2;-1;1;2\right\}\)
\(\Rightarrow m=\left\{-3;-2;0;1\right\}\)
Kết hợp với điều kiện ban đầu \(\Rightarrow m=\left\{-3;-2;0\right\}\)