<s>[INST] Given $a + b = c + d$ and $a^2 + b^2 = c^2 + d^2$ prove $a=c, b=d$ or $a=d, b=c$ 
Given $$a + b = c + d\space \text{and}\space a^2 + b^2 = c^2 + d^2\quad\forall\space a,b,c,d \in \mathbb{R}$$ Prove: $$a=c, b=d\space \text{or} \space a=d, b=c $$


*

*I managed to get $ab=cd$. Don't know how to proceed further.

 [/INST] Let $a = c + \delta$.  Then as $a+b = c+\delta + b = c+d$ we have $b= d-\delta$.
So we ahve $c^2 + d^2 = (c+\delta)^2 + (d-\delta)^2$ so
$2\delta(c-d) + 2\delta^2= 0$.
Case 1:  $\delta = 0$.
The we go back to near the beginning.  Then $a =c+\delta =c$ and $b=d-\delta = d$.
Case 2: $\delta \ne 0$ then
$(c-d) + \delta = 0$
$c = d-\delta$.
But $b = d-\delta$ so $c=b$.
Going way back to the very beginning:
$a + b = c + d$ and $c + d = b+d$ we get $a=d$.
So case 1: $a=c;b=d$ or case 2: $a=d$ and $b=c$.  (or both:  $a=b=c=d$ is always an option.)
</s>