Let \[f(x) =
\begin{cases}
9x+16 &\text{if }x<2, \\
2x-14&\text{if }x\ge2.
\end{cases}
\]If $f(x)=-2$, find the sum of all possible values of $x$.
I need to find the values of $x$ that make $f(x)=-2$. Since $f(x)$ is defined piecewise, I have to consider two cases: one where $x<2$ and one where $x\ge 2$. For the first case, I can use the equation $9x+16=-2$ and solve for $x$. Subtracting 16 from both sides, I get $9x=-18$. Dividing both sides by 9, I get $x=-2$. This is a valid solution, since it satisfies the condition $x<2$. For the second case, I can use the equation $2x-14=-2$ and solve for $x$. Adding 14 to both sides, I get $2x=12$. Dividing both sides by 2, I get $x=6$. This is also a valid solution, since it satisfies the condition $x\ge 2$. Therefore, the possible values of $x$ are $-2$ and $6$. To find their sum, I just add them together: $-2+6=4$. 