Answer
$b=0$ or $b=-2$
Work Step by Step
The piecewise defined functions are continuous on their intervals because they are polynomials.
The only problem that could arise is at $x=0$.
Find the one-sided limits at $x=0$ and set them to be equal, in which case there will exist a limit and $g$ will be continuous at $x=0$:
$\displaystyle \lim_{x\rightarrow 0^{-}} g(x)=\displaystyle \lim_{x\rightarrow 0^{-}}\frac{x-b}{b+1}=-\frac{b}{b+1}$
$\displaystyle \lim_{x\rightarrow 0^{+}} g(x)=\displaystyle \lim_{x\rightarrow-2^{+}}(x^{2}+b)=b$
Set the one-sided limits to be equal
$-\displaystyle \frac{b}{b+1}=b,\qquad (b\neq-1)$
... multiply with $(b+1)$
$-b=b^{2}+b$
$0=b^{2}+2b$
$0=b(b+2)$
$b=0$ or $b=-2$