5. The solution set of the inequality
$$
-2<\sqrt{x^{2}-2 x+4}-\sqrt{x^{2}-10 x+28}<2
$$

is $\qquad$ .
5. $(3-\sqrt{2}, 3+\sqrt{2})$.

The original inequality can be transformed into
$$
\left|\sqrt{(x-1)^{2}+3}-\sqrt{(x-5)^{2}+3}\right|<2 \text {, }
$$

which means the absolute difference of the distances from a point $(x, \sqrt{3})$ on the plane to $(1,0)$ and $(5,0)$ is less than 2.

Since the hyperbola $x^{2}-\frac{y^{2}}{3}=1$ intersects with $y=\sqrt{3}$ at points $(-\sqrt{2}, 0),(\sqrt{2}, 0)$, the solution to the original inequality is
$$
(3-\sqrt{2}, 3+\sqrt{2}) \text {. }
$$