Problem when convert $\sqrt{A}+\sqrt{B}=\sqrt{C}+\sqrt{D}$ to A+B=C+D. This is what my lecturer taught me.
If you have $\sqrt{A}+\sqrt{B}=\sqrt{C}+\sqrt{D}$
You can easily convert to $A+B=C+D$ or $AB=CD$
And then he gave me an example.
$\sqrt{8x+1}+\sqrt{3x-5}=\sqrt{7x+4}+\sqrt{2x-2}$ Find x.
Which is totally work.

After that, I've tried to make my own problem.
But there are some of the problems doesn't work with this technique.
For example, $\sqrt{5x+25}+\sqrt{x}=\sqrt{4x}+\sqrt{3x-5}$.
If I use this technique I'll get $x=30$.
But if I solve the problem normally by power 2 both side I'll get $x = \frac { 40 } { 11 } + \frac { 10 \sqrt { 115 } } { 11 }$.

Questions:
Does anyone know how this technique works?
And what're the limitations?

Try $A=25$, $B=1$ and $C=D=9$.
We see that $$A+B\neq C+D$$ and $$AB\neq CD,$$
but $$\sqrt{A}+\sqrt{B}=\sqrt{C}+\sqrt{D}.$$
We can try to understand, when it happens.
Firstly, $A$, $B$, $C$ and $D$ are non-negatives.
If $A=B$ and $C=D$ we obtain $A+B=C+D$ and $AB=CD.$
Now, let $A>B$, $C>D$, but $A+B=C+D$.
Thus, after squaring of the both sides we obtain
$$A+B+2\sqrt{AB}=C+D+2\sqrt{CD},$$ which gives
$$AB=CD.$$
Thus, $$(A+B)^2-4AB=(C+D)^2-4CD$$ or
$$(A-B)^2=(C-D)^2$$ or
$$A-B=C-D,$$ which after summing with $$A+B=C+D$$ gives $$A=C$$ and $$B=D.$$
