a) Khi $m=-5$ thì phương trình trở thành:
$x^2+2(-5+1)x-5-4=0\Leftrightarrow x^2-8x-9=0\Leftrightarrow (x-9)(x+1)=0\Leftrightarrow \left[ \begin{array}{l}x=9\\x=-1\end{array} \right.$
Vậy $S = \left\{ { - 1;9} \right\}$
b) Để phương trình có hai nghiệm thì $\Delta'\ge 0\Leftrightarrow (m+1)^2-m+4\ge 0\Leftrightarrow m^2+m+5\ge 0$ (hiển nhiên đúng do $m^2+m+5 >0$).
Vậy phương trình luôn có hai nghiệm phân biệt
Theo định lý Viet ta có: $\left\{ \begin{array}{l} {x_1} + {x_2} = - 2\left( {m + 1} \right)\\ {x_1}{x_2} = m - 4 \end{array} \right.$
Theo đề ta có:
$\begin{array}{l} \dfrac{{{x_1}}}{{{x_2}}} + \dfrac{{{x_2}}}{{{x_1}}} = - 3\left( {{x_1},{x_2} \ne 0} \right) \Leftrightarrow \dfrac{{x_1^2 + x_2^2}}{{{x_1}{x_2}}} = - 3 \Leftrightarrow \dfrac{{{{\left( {{x_1} + {x_2}} \right)}^2} - 2{x_1}{x_2}}}{{{x_1}{x_2}}} = - 3\\ \Leftrightarrow \dfrac{{4{{\left( {m + 1} \right)}^2} - 2\left( {m - 4} \right)}}{{m - 4}} = - 3\\ \Leftrightarrow \dfrac{{4{m^2} + 6m + 12}}{{m - 4}} = 1 \Leftrightarrow 4{m^2} + 6m + 12 = - 3m + 12 \Leftrightarrow 4{m^2} + 9m = 0 \Leftrightarrow \left[ \begin{array}{l} m = 0\\ m = \dfrac{{ - 9}}{4} \end{array} \right. \end{array}$