Answer
$$
g(x)=\left\{\begin{array}{ll}{5} & {\text { if } x<0} \\ {x^{2}-2} & {\text { if } 0 \leq x \leq 3} \\ {7} & {\text { if } x>3}\end{array}\right.
$$
We obtain that:
(a)
$$\lim _{x \rightarrow 0} g(x) $$
does not exist since
$$
\lim _{x \rightarrow 0^{+}} g(x) \neq \lim _{x \rightarrow 0^{-}} g(x)
$$
(b)
$$
\lim _{x \rightarrow 3} g(x)=7
$$
Work Step by Step
$$
g(x)=\left\{\begin{array}{ll}{5} & {\text { if } x<0} \\ {x^{2}-2} & {\text { if } 0 \leq x \leq 3} \\ {7} & {\text { if } x>3}\end{array}\right.
$$
A function $g(x)$ defined by two or more cases is called a piecewise function. The domain of $g(x)$ is all real numbers.
To determine the limit as $x$ approaches 0, 3, we are concerned
only with the values of $g(x)$ when $x$ is close but not equal to 0 , 3
Once again,
(a)
$$
\lim _{x \rightarrow 0^{-}} g(x)=5
$$
and
$$
\lim _{x \rightarrow 0^{+}} g(x)=-2
$$
Therefore
$$\lim _{x \rightarrow 0} g(x) $$
does not exist since
$$
\lim _{x \rightarrow 0^{+}} g(x) \neq \lim _{x \rightarrow 0^{-}} g(x)
$$
(b)
$$
\lim _{x \rightarrow 3^{-}} g(x)=7
$$
and
$$
\lim _{x \rightarrow 3^{+}} g(x)=7
$$
Therefore
$$
\lim _{x \rightarrow 3} g(x)=7
$$