Evaluate this function at x=−5. Express your answer as an integer or simplified fraction. If the function is undefined at the given value, indicate "Undefined"

So we have the following piecewise function:
[tex]\begin{gathered} f(x)=-x^2-2x-3\text{ if }x<3 \\ f(x)=-\frac{1}{3}x-8\text{ if }x\ge3 \end{gathered}[/tex]And we need to find f(-5). First of all we must decide which of the two expressions we have to use. We have x=-5 which is smaller than x=3 so we are in the interval x<3 which means that we must take the first expression and substitute x with -5:
[tex]f(-5)=-(-5)^2-2\cdot(-5)-3=-25+10-3=-18[/tex]Then the answer is -18.