Let \[f(x) =
\begin{cases}
x^2+9 &\text{if }x<-5, \\
3x-8&\text{if }x\ge-5.
\end{cases}
\]If $f(x)=10$, find the sum of all possible values of $x$.
To find the values of $x$ that make $f(x)=10$, I need to solve two equations: one for each piece of the function. For the first piece, I have $x^2+9=10$. Subtracting 9 from both sides, I get $x^2=1$. Taking square roots, I get $x=\pm1$. But wait, these values of $x$ are not in the domain of the first piece, which is $x<-5$. So there are no solutions for the first piece. For the second piece, I have $3x-8=10$. Adding 8 to both sides, I get $3x=18$. Dividing by 3, I get $x=6$. This value of $x$ is in the domain of the second piece, which is $x\ge-5$. So there is one solution for the second piece, and it is $x=6$. The problem asks for the sum of all possible values of $x$, so I just add up the one solution I found. The sum is 6. 