4. Solve the inequality
$$
\frac{1}{\sqrt{-x-2}}-\frac{1}{\sqrt{x+4}} \leqslant 1+\frac{1}{\sqrt{(x+4)(-x-2)}} .
$$
4. Note that,
$$
\begin{array}{l}
\frac{1}{\sqrt{-x-2}}-\frac{1}{\sqrt{x+4}} \leqslant 1+\frac{1}{\sqrt{(x+4)(-x-2)}} \\
\Leftrightarrow\left\{\begin{array}{l}
\sqrt{x+4}-\sqrt{-x-2} \leqslant 1+\sqrt{(x+4)(-x-2)}, \\
-x-2>0, \\
x+4>0 .
\end{array}\right.
\end{array}
$$

Consider the following two cases.
$$
\begin{array}{l}
\text { (1) }\left\{\begin{array}{l}
\sqrt{x+4}<\sqrt{-x-2}+1 \\
\Rightarrow x+4 < -x-2 + 2\sqrt{-x-2} + 1 \\
\Rightarrow 2x + 5 < 2\sqrt{-x-2} \\
\Rightarrow x + \frac{5}{2} < \sqrt{-x-2} \\
\Rightarrow x^2 + 5x + \frac{25}{4} < -x - 2 \\
\Rightarrow x^2 + 6x + \frac{33}{4} < 0 \\
\Rightarrow (x + 3)^2 < \frac{3}{4} \\
\Rightarrow -3 - \frac{\sqrt{3}}{2} < x < -3 + \frac{\sqrt{3}}{2} .
\end{array}\right. \\
\text { (2) }\left\{\begin{array}{l}
\sqrt{x+4} > \sqrt{-x-2} + 1 \\
\Rightarrow x + 4 > -x - 2 + 2\sqrt{-x-2} + 1 \\
\Rightarrow 2x + 5 > 2\sqrt{-x-2} \\
\Rightarrow x + \frac{5}{2} > \sqrt{-x-2} \\
\Rightarrow x^2 + 5x + \frac{25}{4} > -x - 2 \\
\Rightarrow x^2 + 6x + \frac{33}{4} > 0 \\
\Rightarrow (x + 3)^2 > \frac{3}{4} \\
\Rightarrow x < -3 - \frac{\sqrt{3}}{2} \text{ or } x > -3 + \frac{\sqrt{3}}{2} .
\end{array}\right.
\end{array}
$$

Combining the two cases, we get:
$$
\begin{array}{l}
\sqrt{(x+4)(-x-2)} \geqslant -2 + \sqrt{5} \\
\Rightarrow x^2 + 6x + 17 - 4\sqrt{5} \leqslant 0 \\
\Rightarrow -3 \leqslant x \leqslant -3 + 2\sqrt{\sqrt{5} - 2} .
\end{array}
$$