PT
$\Leftrightarrow (x+1)(x+3) = (x+3)\sqrt{x^2+1}$
$\Leftrightarrow \left[ {\begin{matrix} x+3=0\\ x+1=\sqrt{x^2+1} \end{matrix}} \right.$
$\Leftrightarrow \left[ {\begin{matrix} x=-3\\ \begin{cases}(x+1)^2=x^2+1 \\ x \ge -1 \end{cases} \end{matrix}} \right.$
$\Leftrightarrow \left[ {\begin{matrix} x=-3\\x=0\end{matrix}} \right.$
Vậy $S=-3+0=-3.$