The piecewise functions are given below as

We were asked to evaluate when x = -2 that is, to find the value of

Considering the condition for

Considering the second function,

Hence,
To calculate the value of

we will substitute the value of

in the function below which is

By substitution, we will have

Therefore,
The final answer is
g(-2) = 0