I've encountered a text claiming that:
$$L:=\mathbb{Z}_{p^2} \rtimes \mathbb{Z}_p $$ when the semidirect product is defined using:
$$\beta: \mathbb{Z}_p \to Aut(L)$$
$$ \beta ([1])=\alpha_{[p+1]}$$
where $\alpha_{[p+1]}(g) = g^{p+1}$
is a non-abelian group of order $p^3$ which has an element of order $p^2$.
I can only justify why it is non-abelian, and that is by using a theorem that states that a semidrect product is abelian iff each of its constituents is abelian and $\beta$ is trivial. Since $\beta$ here is not trivial, then this is not abelian.
I cannot seem to justify the rest -- why is it of order $p^3$? And how can I show there's an element of order $p^2$? (perhaps for the latter it would be sufficient to show that $\mathbb{Z}_{p^2}$ is cyclic with generator $a$ and then take $(a,1)$? But I'm unable to prove that it's cyclic (and I actually think it cannot be because then it would 'collapse' to $\mathbb{Z}_p$) - EDIT: I can see this would be obtained using Cauchy from knowing it's $p^3$. So now I'm still left with that $p^3$).
What am I missing?
Remark that $G$ is the semidirect product of two subgroups $H, K$ iff the following holds :$H$ is normal, $$G=HK$$, $$H\cap K=\{e\} $$ In particular, the map $$H\times K \to G$$ $$f(h, k) =hk$$ is a bijection. So, $$\lvert G\rvert =\lvert H\rvert \times \lvert K\rvert =p^{3}$$ Moreover Cauchy give the existence of elements having prime order for every prime dividing the order of the group, so it doesn't give elements of order $p^{2}$,in fact your first choice can be modified, to consider the element $(a, 0)$ which has order $p^{2}$.