The question is: Suppose $$f(x) = x^2+1,$$ $$g(x) = 3-x.$$ Find the values for $x$ for such that $$(g\circ f)(x) = (f \circ g)(x).$$
I tried banging my head for one hour but my answer doesn't match the one given by the book which is $1/\sqrt{2}$ and $-1/\sqrt{2}$. I think the answer given in the book is wrong because I even tried putting the given answer in $(g\circ f)(x)$ and $(f \circ g)(x)$ and the two don't match up. My answer: $$ x =\frac{3\pm\sqrt{-7}}{2} $$