I am trying to prove that the group $\mathbb Z_{p^2}$ (p prime) is not a non trivial semidirect product. Since a group $G \cong K \rtimes H$ if and only if for all short exact sequences $$0 \rightarrow H \rightarrow G \rightarrow K \rightarrow 0$$splits on the right, then I thought that I could prove that the appropiate sequence doesn't split on the right.
The only non trivial group of $\mathbb Z_{p^2}$ is $\mathbb Z_p$, so the only possible non trivial semidirect product is $\mathbb Z_p \rtimes \mathbb Z_p$. I define the sequence $$0\longrightarrow \mathbb Z_{p} \overset{f}{\longrightarrow} \mathbb Z_{p^2} \overset{g}{\longrightarrow} \mathbb Z_p \longrightarrow 0 $$ Where $f$ is the inclusion an $g$ is the "projection".
I would like to show that there is no such $\beta: \mathbb Z_p \to \mathbb Z_{p^2}$ with $g \circ \beta =Id_{\mathbb Z_{p}}$.
Any help with this part of the solution would be appreciated.
$\mathbb{Z}_{p^2}$ has a unique subgroup of order $p$, and that subgroup is the kernel of the homomorphism $g$.