Prove that $\{m,n\} =\{k,l\}$ 
Let $n,m,k,l$ be positive integers and $p$ and odd prime with $0 \leq n,m,k,l \leq p-1$ and $$n+m \equiv k+l \pmod{p}, \quad n^2+m^2 \equiv k^2+l^2 \pmod{p}.$$ Prove that $\{m,n\} =\{k,l\}$.

We can rearrange the third condition to get $(n-l)(n+l) \equiv (k-m)(k+m) \pmod{p}$. How do we continue from here?

First, observe that $n^2 + 2mn + m^2 \equiv (n+m)^2 \equiv (k+l)^2 \equiv k^2 + 2kl + l^2$, so $kl \equiv mn$ (since $p$ is odd, 2 is a unit).
If $k \equiv 0$, then $0 \equiv kl \equiv mn$. Without loss of generality we have $m \equiv 0$, and thus $n \equiv l$. The claim follows then from $0 \le m,n,k,l \le p-1$.
Otherwise, let $k \not\equiv 0$. This means $k$ is a unit, and we can find $a$ in $\mathbb{F}_p$ with $m \equiv ak$ (choose e.g. $a = k^{-1} m$). It follows that $kl \equiv akn$, and thus $l \equiv an$ (by multiplying both sides with $k^{-1}$). Furthermore, $k + an \equiv k + l \equiv n + m \equiv n + ak$.
If $a \equiv 1$, then we immediately have $l \equiv n$ and $m \equiv k$, and the claim follows as before from $0 \le m,n,k,l \le p-1$.
Else, we get $k \equiv n$ and thus $l \equiv an \equiv ak \equiv m$. As before, $\{ k,l \} = \{ m,n \}$.
