I'm asked to show there exist integers $a$ and $b$ such that $a^2+b^2\equiv -1\mod p$ for any odd prime $p$.
The solution starts by saying that the subsets $\{a^2\}$ and $\{-1-b^2\}$ of $\mathbb Z/p\mathbb Z$ both contain $\frac{p-1}{2}$ elements. Why is this? What even is the subset $\{a^2\}$? Is this related to how there are $\frac{p-1}{2}$ quadratic residues and $\frac{p-1}{2}$ quadratic non-residues $\mod p?$
Let $A=\{a^2 : a\in \mathbb{Z}/p\mathbb{Z}\}$ and $B=\{-1-b^2:b\in\mathbb{Z}/p\mathbb{Z}\}=-1-A$. Then $A$ and $B$ have the same number of elements, $\frac{p-1}{2}+1=\frac{p+1}{2}$. Note that $0 \in A$. Therefore, $A$ and $B$ cannot be disjoint.