Solution (source code)

= Solution

Set $P_0=G$ and $P_{i+1}=P_i^p$. The permitted power-embedding result, applied repeatedly, gives $[P_i,G]\leq P_{i+1}$, and each $P_i$ is a <powerful p-group>. These <subgroups> eventually reach $1$: if $P_i\ne1$, its <Frattini subgroup> $P_i^p$ is proper. In fact these are the <lower p-series> layers, with their indices shifted by one.

For $x\in G$ and $y\in P_i$, the <commutator> $[y,x]$ lies in $P_{i+1}$, is central modulo $P_{i+2}$, and has exponent dividing $p$ there. The class-two collection calculation from part (iv) therefore gives
$$
(xy)^p\equiv x^py^p\pmod {P_{i+2}}.
$$
Applying part (iv) inside $P_i$, whose third lower-series term is contained in $P_{i+2}$, shows that the map $y\mapsto y^p$ is onto $P_{i+1}/P_{i+2}$.

Given $a\in P_1$, first choose $x$ with $x^p\equiv a\pmod {P_2}$. Suppose $x^p\equiv a\pmod {P_{i+1}}$. Choose $y\in P_i$ with $y^p\equiv x^{-p}a\pmod {P_{i+2}}$. The displayed collection congruence then gives $(xy)^p\equiv a\pmod {P_{i+2}}$. Replacing $x$ by $xy$ improves the approximation by one layer. Since the <filtration on a group> terminates, a finite sequence of corrections gives $x^p=a$ exactly. The reverse inclusion is the definition of $G^p$. Hence
$$
\boxed{G^p=G^{\{p\}}=\{x^p:x\in G\}.}
$$