$f$ and $g$ are functions from $\mathbb{R}$ to $\mathbb{R}$ defined with $f(x) = x^2$ and $g(x) = x + 1, x \in \mathbb{R} $. Task is to find $f \circ g$ and $g \circ f$.
My logic: EDITED $$g \circ f = g(f(x)) =$$ $$g(x + 1) = (x+1)^2=$$ $$g(x + 1) = (x+1)(x+1)$$ $$g(x + 1) = x^2 + 2x + 2$$
$$f \circ g = f(g(x)) =$$ $$f(x^2)=(x^2+1)$$ Does my logic proper? Is that solved?
You say that $f(x) = x^2$, but in your calculations, you are inserting $f(x) = x+1$. For $g$ it's opposite. Apart form this mixup, it looks perfect. Of course, what you have here is only half of what you were asked to do.
Regarding the edit: I don't know if you thought to fix things with a quick rewrite, but it made things worse: Now you say that you want to calculate $f\circ g = f(g(x))$ on the first row, then on the second row, you're calculating $g(f(x))$ (ignoring the mixup I mentioned above). That's the wrong way around.
As for the last two lines, none of the functions are square roots, so where did that come from? You are not supposed to calculate inverse functions here, just compositions.
So, if we use the definitions you've written in the beginning of your answer, $f(x) = x^2$ and $g(x) = x+1$, we get $$ f\circ g(x) = f(g(x))\\ = f(x+1)\\ = (x+1)^2\\ = x^2 + 2x + 1 $$ while the other way around gives $$ g\circ f(x) = g(f(x))\\ = g(x^2)\\ = x^2 + 1 $$