======================================
Explanation:
The piecewise function g(x) is defined based on what the input is.
---------------
In the case of g(-1), we have x = -1 which makes [tex]-2 \le x < 1[/tex] true.
So we'll use the second piece
g(x) = -(x-1)^2+3
g(-1) = -(-1-1)^2+3
g(-1) = -(-2)^2+3
g(-1) = -4+3
g(-1) = -1
----------------
For g(1), we have x = 1 which makes [tex]x \ge 1[/tex] true
We'll use the third piece
g(x) = (-1/2)x-1
g(1) = (-1/2)*1 - 1
g(1) = -1/2 - 1
g(1) = -1/2 - 2/2
g(1) = -3/2
-----------------
For g(5), we have x = 5 which makes [tex]x \ge 1[/tex] true
g(x) = (-1/2)x-1
g(5) = (-1/2)*5-1
g(5) = -5/2 - 1
g(5) = -5/2 - 2/2
g(5) = -7/2