$a)(m+2)x+4(2m+1)=m^2+4(x-1)\\ \Leftrightarrow (m+2)x+4(2m+1)-m^2-4(x-1)=0\\ \Leftrightarrow (m+2)x-4x-m^2-4(2m+1)+4=0\\ \Leftrightarrow (m-2)x-m^2-8m=0\\ \Leftrightarrow (m-2)x-m(m+8)=0\\ \circledast \left\{\begin{array}{l} m=2\\ \left[\begin{array}{l} m=0\\ m=-8\end{array} \right.\end{array} \right.\\ \Leftrightarrow m\in\varnothing\\ \circledast \left\{\begin{array}{l} m=2\\ \left\{\begin{array}{l} m\ne 0\\ m\ne-8\end{array} \right.\end{array} \right.\\ \Leftrightarrow m=2$
$\Rightarrow$ Phương trình vô nghiệm
$\circledast m\ne 2$
$\Rightarrow$ Phương trình có nghiệm duy nhất $x=\dfrac{m^2+8m}{m-2}$
$b)\dfrac{mx+3}{6}+\dfrac{m^2-1}{2}=\dfrac{x+5}{10}+\dfrac{2}{5}(x+m^2+1)\\ \Leftrightarrow\dfrac{5mx+15}{30}+\dfrac{15m^2-15}{30}=\dfrac{3x+15}{30}+\dfrac{12x+12m^2+12}{30}\\ \Leftrightarrow 5mx-15x+3m^2-27=0\\ \Leftrightarrow 5(m-3)x+3(m^2-9)=0\\ \Leftrightarrow 5(m-3)x+3(m-3)(m+3)=0\\ \circledast \left\{\begin{array}{l} m=3\\ \left[\begin{array}{l} m= 3\\ m= -3\end{array} \right.\end{array} \right.\\ \Leftrightarrow m=3$
$\Rightarrow$ Phương trình có vô số nghiệm
$\circledast \left\{\begin{array}{l} m=3\\ \left\{\begin{array}{l} m\ne 3\\ m\ne -3\end{array} \right.\end{array} \right.\\ \Leftrightarrow m\in\varnothing\\ \circledast m \ne 3$
$\Rightarrow$ Phương trình có nghiệm duy nhất $x=\dfrac{3(m-3)(m+3)}{5(m-3)}=\dfrac{3(m+3)}{5}$