Answer
$f(g(x)) = (3x + 2)^2 + 1$, $g(f(x)) = 3(x^2 + 1) + 2$, so $9x^2 + 12x + 5 = 3x^2 + 5$, $6x^2 + 12x = 0$,
$x = 0$, $−2$
Work Step by Step
$f(x) = x^2 + 1$, $g(x) = 3x + 2$
finding first $f(g(x))$
$f(g(x)) = (3x + 2)^2 + 1 = 9x^2 + 12x + 5$
finding second $g(f(x))$
$g(f(x)) = 3(x^2 + 1) + 2 = 3x^2 + 5$
Now equating both simplifies to
$9x^2 + 12x + 5 = 3x^2 + 5$
$6x^2 + 12x = 0$
Hence all values of $x$ are $0$ and $−2$