<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] Having gotten $ab=cd$, take a linear combination with $a^2+b^2=c^2+d^2$:
$\color{blue}{ab=cd}$
$\color{brown}{a^2+b^2=c^2+d^2}$
$\color{brown}{a^2}\color{blue}{-2ab}\color{brown}{+b^2}=\color{brown}{c^2}\color{blue}{-2cd}\color{brown}{+d^2}$
Those polynomials are squares:
$(a-b)^2=(c-d)^2$
$a-b=\pm(c-d)$
Then if $a-b=+(c-d)$ and $a+b=c+d$, we are forced to have $a=c,b=d$. Can you fill in the result for the case $a-b=-(c-d)$?
</s>