Answer
$(f\circ g)(x)=4x^2+6x+2$
$(g\circ f)(x)=2x^2+2x+1$
Work Step by Step
Using $(f\circ g)(x)=f(g(x)),$ with $f(x)=x+x^2$ and $g(x)=2x+1,$ then
\begin{align*}\require{cancel}
f(g(x)&=f(2x+1)
\\&=
2x+1+(2x+1)^2
\\&=
2x+1+[(2x)^2+2(2x)(1)+(1)^2]
&(\text{use }(a+b)^2=a^2+2ab+b^2)
\\&=
2x+1+[4x^2+4x+1]
\\&=
4x^2+(2x+4x)+(1+1)
\\&=
4x^2+6x+2
.\end{align*}Hence, $(f\circ g)(x)=4x^2+6x+2$.
Using $(g\circ f)(x)=g(f(x)),$ then
\begin{align*}\require{cancel}
g(f(x)&=g(x+x^2)
\\&=
2(x+x^2)+1
\\&=
2x+2x^2+1
\\&=
2x^2+2x+1
.\end{align*}Hence, $(g\circ f)(x)=2x^2+2x+1$.