Solving $\sqrt{2x+1}-\sqrt{2x-1}=2$ I solved $\sqrt{2x+1}-\sqrt{2x-1}=2$
by squaring both sides.
$$\sqrt{2x+1}=\sqrt{2x-1}+2$$
$$2x+1=(2x-1)+4\sqrt{2x-1}+4$$
$$-1=2\sqrt{2x-1}$$
$$1=4({2x-1})$$
$$x=\frac{5}{8}$$
Now when I put $x=\frac{5}{8}$ to the given equation,I get $\sqrt{\frac{5}{4}+1}-\sqrt{\frac{5}{4}-1}=1 \neq 2$
What am I missing ?
 A: As pointed out by dxiv in the comments, looking at the statement,
$$-1 = 2 \sqrt{2x-1}$$
notice that $\sqrt z$ is positive for all $z > 0$; hence, the right-hand side must be nonnegative, but the left-hand negative.
Bear in mind this is on the premise that your original equation has a solution, i.e. if your original equation has a solution, the above has one too (but because of the squaring, you introduce extraneous solutions, and need to double-check them as you did: some may be invalid).
No solution can exist then.

We can prove this more rigorously using calculus. Define
$$f : \mathbb{R} \to \mathbb{R} \text{ by } f(x) := \sqrt{2x+1} - \sqrt{2x-1} - 2$$
$x$ will solve your equation only if $f(x) = 0$. Then we see
$$f'(x) = \frac{1}{\sqrt{2x+1}} - \frac{1}{\sqrt{2x-1}}$$
Of course, $\sqrt{2x+1} > \sqrt{2x-1}$ for all $x>0$, so $f'(x) < 0$ for all $x$.
Thus, $f$ is a decreasing function on its domain. It thus achieves its highest value at its leftmost point, $1/2$, but there $f(1/2) = \sqrt 2 - 2 < 0$.
Hence, $f(x) \ne 0$ and no real solution exists.

A look at the graph for completeness (Desmos link):

A: Your re-arranged equation $ \ \sqrt{2x+1} \ = \ \sqrt{2x-1} \ + \ 2 \ \ $ would give the $ \ x-$coordinates for the intersection points between two square-root curves, if such points exist.  However, "squaring" this equation reveals a difficulty.  The curve equation $ \ y^2 \ = \ 2x + 1 \ \ $ implied by the left side represents a "horizontal" parabola "opening to the right" from the vertex $ \ \left( \ -\frac12 \ , \ 0 \ \right) \ \ , $ for which $ \ y \ = \ \sqrt{2x + 1} \ $ is the "upper arm" of the parabola [violet curve in the graph below] and $ \ y \ = \ -\sqrt{2x + 1} \ $ is the "lower arm" [red curve].  On the right side of the squared equation, the curve equation would be $ \ (y - 2)^2 \ = \ 2x - 1 \ \ , $ a horizontal parabola which also "opens to the right" and has the vertex $ \ \left( \ +\frac12 \ , \ \mathbf{2} \ \right) \ \ , $  The original square-root curve $ \ y \ = \ 2 + \sqrt{2x - 1} \ $ is the upper arm [blue curve] of this parabola; at $ \ x \ = \ \frac12 \ , $ the square-root curve function $ \ y \ = \ \sqrt{2x + 1} \ $ has only attained the value $ \ \sqrt2 \ \ , $ so it does not  meet $ \ y \ = \ 2 + \sqrt{2x - 1} \ $ and always remains "below" this latter curve thereafter.
However, the lower arm of that parabola [orange curve], which is the square-root function $ \ y \ = \ 2 - \sqrt{2x - 1} \ $ does intersect $ \ y \ = \ \sqrt{2x + 1} \ $ at $ \ x \ = \ \frac58 \ \ , $ as you found.  $ [ \ \sqrt{2·\frac58 + 1} \ = \ \sqrt{\frac94} \ = \ \frac32 \ = \ 2 - \sqrt{2·\frac58 - 1} \ = \ 2 - \sqrt{\frac14} \ = \ 2 - \frac12 \ \ . \ ] $
The parabolas "generated" by the "squared equation" have an intersection point, but since square-roots of real numbers are always taken to be non-negative, we "reject" the intersection with the "negative-of-square-root arm" of one of those parabolas.  This leaves no (real-valued) solutions to the original equation.

A: When you square, the solution will be among those you find but you may introduce extraneous solutions.  This plot from Alpha implies there are no roots in the reals.  I started at $x=\frac 12$ which is the lowest where the square roots are defined.

