Which $p$- groups satisfy $G^p\gamma_2(G)=G^p\gamma_3(G)$? Let $G$ be a finite $p$-group. Let $\gamma_n(G)$ denote the lower central series of $G$. In particular we have $\gamma_2(G)=[G,G]$ and $\gamma_3(G)=[[G,G],G]$.  Let $G^p$ be the subgroup generated by $p$-powers.
Which finite $p$-groups $G$ satisfy
$$G^p\gamma_2(G)=G^p\gamma_3(G)?$$
It is clear  that all abelian $p$-groups satisfy this condition and groups of exponent $p$ satisfy this condition iff their are abelian.
Is there an example of a non-abelian group satisfying this?
 A: Say $p$ is prime.   Consider $$G:=\Bbb Z_{p^2}\rtimes \Bbb Z_p.$$
The group is nilpotent of nilpotency class $2$.
And $$\gamma_2(G)=[G,G]=G^p.$$
A: It is not hard to construct nonabelian examples. If every element of $\gamma_2(G)$ and of $\gamma_3(G)$ is a $p$th power, then $G^p\gamma_2(G) = G^p = G^p\gamma_3(G)$. This happens in the nonabelian group of order $p^3$ and exponent $p^2$ ($p$ odd), and in the quaternion group of order $8$.
The key is that if $G$ is a group, and $z$ is central of order $k$ in $G$, then we can adjoin a $p$th root of $z$ to $G$. If we then take $p$-group of class $2$, since $\gamma_2(G)$ is central and $\gamma_3(G)$ is trivial, if we add $p$th roots to every element of $\gamma_2(G)$ we will have the desired equality.
Lemma. Let $G$ be a group, and let $z$ be a central element. Then there is a group $K$ and an embedding $\iota\colon G\to K$ such that $\iota(z)$ has a $p$th root in $K$. Moreover, if $G$ is nilpotent of class $c$ (resp. solvable of length $s$) then so is $K$.
Proof. Let $z$ have order $n$; if $z$ is not torsion, set $n=0$. Let $C_{pn}$ be the cyclic group of order $pn$ with generator $x$ ($C_0$ is understood to be the infinite cyclic group), written multiplicatively.
Let $N$ be the subgroup of $G\times C_{pn}$ generated by $(z^{-1},x^p)$. Since both $(z,1)$ and $\{1\}\times C_{pn}$ are central, this subgroup is normal. In addition, $N\cap G\times\{1\}=\{(1,1)\}$: if $(z^{-1},x^p)^r=(z^{-r},x^{pr})\in G\times\{1\}$ then $pn|pr$, so $n|r$, and therefore $z^{-r}=1$.
Now let $K=(G\times C_{pn})/N$, and let $\iota\colon G\to K$ be given by $\iota(g) = (g,e)N$. This is an embedding, by the argument in the previous paragraph. And in $K$, we have $((1,x)N)^p = (1,x^p)N = (z,1)N = \iota(z)N$, so the image of $z$ in $K$ has a $p$th root, as desired.
Note that the nilpotency class (resp. solvability length) of $G\times C_{pn}$ is equal to that of $G$, and hence $K$ has class (resp. length) at most that of $G$. And since $K$ contains a copy of $G$, the nilpotency class (resp. solvability length) is at least that of $G$. Thus, they are equal, as claimed. $\Box$
Note in addition that in the given construction, $\gamma_2(K) = \iota(\gamma_2(G))$.
Now let $G$ be any finite nonabelian group of class $2$. Adjoin a $p$th roots to each element of $\gamma_2(G)$ that does not already have one to obtain a group $K$ in which every element of $\gamma_2(K)$ is a $p$th power, and we obtain a nilpotent group of class exactly two for which $K^p\gamma_2(K) = K^p = K^p\gamma_3(K)$.
Added. In addition, the equality holds for all $2$-groups, regardless of class.
Indeed, since $G/G^2$ is of exponent $2$, it is abelian, so $\gamma_3(G)\leq \gamma_2(G)\leq G^2$. Thus, $G^2\gamma_2(G)=G^2=G^2\gamma_3(G)$.
In general, if $G$ has exponent $p$, then the equation reduces to $\gamma_2(G)=\gamma_3(G)$, which for finite $p$-groups holds if and only if $\gamma_2(G)=\gamma_3(G)=\{e\}$. So the only groups of exponent $p$ which satisfy the conclusion are abelian.
Now let $G$ be an arbitrary finite $p$-group, and look at $\overline{G}=G/G^p$; let $\pi$ be the canonical projection. If $G^p\gamma_2(G)=G^p\gamma_3(G)$, then the terms of the lower central series are verbal we have $$\gamma_2(\overline{G}) = \pi(\gamma_2(G)) = \pi(G^p\gamma_2(G)) = \pi(G^p\gamma_3(G))=\pi(\gamma_3(G))=\gamma_3(\overline{G}).$$
Therefore, it follows that $\overline{G}$ is abelian, and therefore that $\gamma_2(G)\leq G^p$. Thus, if $G$ has the property, then $\gamma_2(G)\leq G^p$. Conversely, if $\gamma_2(G)\leq G^p$ then we will have equality, since $G^p\gamma_2(G)=G^p=G^p\gamma_3(G)$.
Therefore,
Theorem. If $G$ is a finite $p$-group, then $G^p\gamma_2(G)=G^p\gamma_3(G)$ if and only if $\gamma_2(G)\leq G^p$. In particular, if $p=2$ the condition holds for any $2$-group.
Now, the condition $\gamma_2(G)\leq G^p$ with $p$ odd is well-known:
Definition. Let $G$ be a $p$-group. We say that $G$ is powerful if $p$ is odd and $\gamma_2(G)\leq G^p$; or if $p=2$ and $\gamma_2(G)\leq G^4$.
So the groups you want are precisely the $2$-groups, and the powerful $p$-groups for odd $p$. There are a lot of resources for powerful groups, and there are powerful groups of arbitrarily large class for any odd $p$.
Theorem. Let $G$ be a finite $p$-group. The following are equivalent.

*

*$G^p\gamma_2(G)= G^p\gamma_3(G)$.

*Either $p=2$ or $\gamma_2(G)\subseteq G^p$.

*$G$ is either a $2$-group or a powerful $p$-group.

