grinding some piecewise-defined functions today, aren't we?
we have $2x + 7 = -5$, so $x = -6.$
we also have $-x^2 - x + 1 = -5$, and solving for $x$ gives us solutions of $-3$ and $2.$ As $-3$ is not greater or equal than $-2$, we only consider the $2.$
So, the values of $x$ are $-6$ and $2.$ the sum of these is $\boxed{-4}.$ nice