Answer
$(f\circ g)(x)
=
x^2+2x-1
,\\
(g\circ f)(x)
=
x^2-1
$
Work Step by Step
With $f(x)=x^2-2$ and $g(x)=x+1$, then,
\begin{array}{l}
(f\circ g)(x)
\\=
f(g(x))
\\=
f(x+1)
\\=
(x+1)^2-2
\\=
x^2+2x+1-2
\\=
x^2+2x-1
,\\\\
(g\circ f)(x)
\\=
g(f(x))
\\=
g(x^2-2)
\\=
x^2-2+1
\\=
x^2-1
.\end{array}