If you ensure that $$ \begin{cases} x+1\ge0\\\ x-1\ge0\\\ 2x+1\ge0 \end{cases} $$ then you can square both sides, because they are guaranteed to exist and, when $a,b\ge0$, $a=b$ if and only if $a^2=b^2$.
The conditions above are equivalent to $x\ge1$.
Squaring we get $$ x+1+2\sqrt{x^2-1}+x-1=2x+1 $$ that simplifies to $$ 2\sqrt{x^2-1}=1 $$ and you can square again, because both sides are non negative. This gives $$ 4x^2=5. $$ Since you know that $x\ge1$, the only solution is $$ x=\frac{\sqrt{5}}{2}. $$