In the course of proving some properties about an algorithm to pick an element of prime order $p$ from a finite group $G$ such that $p ∥ \lvert G \rvert$ ($p \mid \lvert G \rvert$ but $p^2 \not\mid \lvert G \rvert$), I needed the following lemma:
Lemma: Let $G$ have order $m$ with prime $p ∥ m$, and let $f(x) = x^{m/p}$. If $y$ is a non-identity element in the image of $f$, then $\lvert f^{-1}(\{ y \}) \rvert = C$ for some constant $C$ independent of $y$. In other words, each non-identity element in the image of $f$ has an equal number of elements of $G$ mapping to it.
This lemma becomes easy if we can assume that $G$ is commutative, since then $f(x)$ is a group homomorphism, and thus each $y$ in the image is isomorphic to a coset of $\ker f$.
I've managed to prove this myself for arbitrary finite groups, but was wondering if it was correct, and if there's a better way to prove it. Here's my proof (take as given that any non-identity element in the image of $f$ has order $p$):
Proof: Let $A_{m/p}$ be the set of elements of $G$ with order a factor of $m/p$, and let $k$ be an integer such that $k(m/p) ≡ 1 \pmod p$. If $y$ is a non-identity element in the image of $f$, then we want to show that $$ f^{-1}(\{y\}) = \{ xy^k \mid x ∈ A_{m/p} ∩ C_G(y) \}\text{,} $$ where $C_G(y)$ is the centralizer of $y$.
Let $xy^k$ be in the set on the right-hand side. $x$ commutes with $y$, so it must also commute with $y^k$, and $(xy^k)^a = x^a y^{ka}$ for any $a$. Therefore, $$ (xy^k)^{m/p} = x^{m/p} y^{k(m/p)} = y\text{.} $$
Going the other way, let $z ∈ f^{-1}(\{ y \})$. Since $y$ has order $p$, $z$ had order $pn$ where $n \mid m/p$. $p$ and $n$ are coprime, so there exists $z_1, z_2 ∈ G$ such that $z = z_1 z_2 = z_2 z_1$, $\operatorname{ord}(z_1) = p$, and $\operatorname{ord}(z_2) = n$. (Let $ap + bn = 1$. Then $z_1 = z^{bn}$ and $z_2 = z^{ap}$.) $z_1$ must be in the subgroup generated by $y$, so $z_1 = y^k$, and $z_2 ∈ A_{m/p} ∩ C_G(y)$.
Then let $y_1$ and $y_2$ be non-identity elements in the image of $f$. If $y_1$ and $y_2$ are in the same cyclic subgroup, then $y_2 = y_1^a$ for some $a$, and thus $C_G(y_1) = C_G(y_2)$. Therefore, the map $$ g(xy_1^k) = xy_2^k $$ is a bijection from $f^{-1}(\{ y_1 \})$ to $f^{-1}(\{ y_2 \})$.
Otherwise, if $y_1$ and $y_2$ are not in the same cyclic subgroup, then they're in different $p$-Sylow subgroups of $G$. By the second Sylow theorem, there is some $w$ such that $y_2 = wy_1'w^{-1}$ for some $y_1'$ in the cyclic subgroup generated by $y_1$. Then we want to show that the map $g(x) = wxw^{-1}$ is a bijection from $f^{-1}(\{y_1'\})$ to $f^{-1}(\{y_2\})$.
Let $xy_1'^k ∈ f^{-1}(\{y_1'\})$. Then $$ g(xy_1'^k) = g(x)y_2^k\text{.} $$ Conjugation preserves order, and it also commutes with taking the centralizer. Therefore, $g(x) ∈ A_{m/p}$ and $g(x) ∈ C_G(y_2)$, so $g(xy_1'^k) ∈ f^{-1}(\{ y_2 \})$, and thus $g(f^{-1}(\{ y_1' \})) ⊆ f^{-1}(\{ y_2 \})$. The other inclusion holds similarly. In particular, both inverse images have the same size, and by the first part above $f^{-1}(\{y_1\})$ has the same size as $f^{-1}(\{y_2\})$. $∎$
(Note that, unlike the commutative case, the exclusion of the identity is necessary. If $G = S_3$ and $p = 2$, then each transposition has exactly one element in the preimage of $f(x) = x^3$ (itself), but $e$ has three elements in the preimage of $f$; $e$ itself and the two $3$-cycles.)