We have to evaluate the piecewise defined function

to evaluate this type of function we have to be careful to choose the right relation for the number we are evaluating.
Let's do the first one

Since the -2 lies in the second interval of the function we have to choose the second relation in the function, then

therefore g(-2)=7.
To evaluate g(0) we notice that x=0 also lies in the second interval of the piecewise function. Then

therefore g(0)=-1.
Finally, to evaluate g(5) we notice that x=5 lies in the third interval of the function, then

Therefore g(5)=-1/2.