A group $(G,\cdot)$ where every element except $e$ is of order $p$ 
Let $(G,\cdot)$ be a group such that the order of any element of $G$ which is not the identity is the positive integer $p$.
a) Prove that $p$ is a prime number.
b) Prove that if any subset of $G$ which has $p^2-1$ elements has $p$ elements which commute with each other, then $G$ is abelian.

I managed to solve a), but I couldn't make any progress on b).
For a), assume that $p$ is not prime $\implies \exists a,b\in \mathbb{N}, a, b \ge 1$ such that $p=ab$.
Now we have that $\operatorname{ord}(x^a)=b$, $\forall x\in G\setminus \{e\}$, so $\operatorname{ord}(x^a)<p$, contradiction. As a result, $p$ is a prime.
 A: Here is a quick sketch of the proof of b). I will leave you to fill in the details.
Assume that the given condition on subsets holds. Let $x,y \in G$. We need to show that $x$ and $y$ commute. If either $x$ or $y$ is a power of the other then they commute, so suppose not. Note that since $x$ is a power of $x^i$ for any $i$ with $1 \le i < p$, and similarly for $y$, it is enough to show that $x^i$ commutes with $y^j$ for some $i,j$ with $1 \le i,j < p$. Let $$S = \{x^iy^j : 0 \le i,j < p,\,(i,j) \ne (0,0)\}.$$
Then $S$ is a subset consisting of $p^2-1$ elements of $G$, so there is a subset $T$ of $S$ of size $p$ such that all elements of $T$ commute.
If $T$ contains an element of the form $y^j$, then not all elements of $T$ can be of that form, so there is some element $x^iy^k$ of $T$ with $i \ne 0$. Then $y^j$ commutes with $x^iy^k$ and hence with $x^i$, so $x$ and $y$ commute. Similarly if there is an element of $T$ of form $x^i$.
Otherwise there must be some $i>0$ such that $T$ contains two  elements $x^iy^j$ and $x^iy^k$ where $j \ne k$ and, by the previous paragraph, $j,k$ are both nonzero. So $y^k$ is a power $(y^j)^l$ for some $l$ with $2 \le l < p$. So $x^iy^k$ commutes with $x^i(y^j)^l$ and hence with $(y^j)^{l-1}$, which therefore commutes with $x^i$, so again $x$ and $y$ commute.
