Non-abelian Groups of Order $p^3$ I am trying to show that a non-abelian group $G$ of order $p^3$ is isomorphic to one of two groups constructed on page 48 of these group theory notes (see examples 3.14 and 3.15 on that page). 
Here is some of my work so far: 

Since $G$ is a $p$-group, it must have non-trivial center; but, as $G$ is non-abelian, the order of $Z := Z(G)$ must be $p$. This means that $G/Z \cong \Bbb{Z}_p \times \Bbb{Z}_p$, so $G/Z$ is generated by two elements. Let $x,y$ be the elements whose images (under the canonical projection map) in $G/Z$ generate $G/Z$. Since $G/Z$ is abelian (all $p^2$ groups are abelian), $[x,y] \in Z$. If $[x,y]$ were the identity, then $G$ would actually be abelian, so $[x,y] \neq 1$, in which case the only possible order of it is $p$. Hence, $Z = \langle [x,y] \rangle$.

At this point, my idea was to break up the problem into two cases: both $x$ and $y$ have order $p$, or at least one has order For the first case, I thought I was basically finished. I showed that $x$, $y$ and $[x,y]$ satisfied the three defining relations in example 3.15:
$$a^p = b^p = c^p = 1 \text{ , } ab = cac^{-1} \text{ , } [b,a] = 1 = [b,c],$$
where, in my situation, $a = x$, $b = [x,y]$, and $c =y$. But then it quickly occured to me that $[x,y] \in \langle x,y \rangle$, so the commutator cannot be the third generator.
As for the case, I wasn't able to come up with anything. I have been working on this problem for a rather long time; I could use some guidance. Initially I was vainly following the hint in the back of the book; but then someone in the chatroom kindly pointed out that the author made a false claim in the hint.  
 A: (1) $G/Z(G)$ is generated by $xZ(G)$ and $yZ(G)$; $Z(G)$ is generated by $[x,y]$ (also note $Z(G)=G'$).
(2) Suppose that not both $x,y$ have order $p$. This implies two cases: $o(x)=p^2$, $o(y)=p$ or $o(x)=o(y)=p^2$. [The case $o(x)=p, o(y)=p^2$ has considered, can you see?]
(2.1) Suppose $o(x)=p^2$ and $o(y)=p$. Then $\langle y\rangle$ is subgroup of order $p$, and $\langle y\rangle\cap Z(G)=1$. 
Since $xZ(G)$ is of order $p$, so $x^p\in Z(G)$, and $x^p\neq 1$ (since $o(x)=p^2)$, so without loss, we can take $x^p=[x,y]$. So $\langle x\rangle$ is group of order $p^2$, it has unique subgroup of order $p$ namely $\langle x^p\rangle$ which is $\langle [x,y]\rangle$, which is $Z(G)$, and $\langle y\rangle$ intersects with this trivialy; i.e. $\langle x\rangle\cap\langle y\rangle=1$. So $G=\langle x\rangle.\langle y\rangle=\langle x,y\rangle$, where $x,y$ satisfy relations (which perhaps you want)
$$x^{p^2}=1, y^p=1, x^p=[x,y]=x^{-1}y^{-1}xy \mbox{ i.e. } x^{1+p}=y^{-1}xy.$$
(2.2) Suppose $o(x)=o(y)=p^2$. Then point is we can modify one of these two generators to get a new generator of order $p$. How to do this? This requires commutator calculus: since $[x,y]\in Z(G)$, so $[x,y]$ commutes with both $x$ and $y$. You can prove that $(xy)^n=x^ny^n[y,x]^{\binom{n}{2}}$. (Prove this, use induction on $n$.)
Now we use this. Since $o(X)=o(y)=p^2$, and $x^p,y^p\in Z(G)=\langle [x,y]\rangle$, without loss, we can assume that 
$$x^p=y^p=[x,y].$$
Then $$(yx^{-1})^p=y^px^{-p}[x^{-1},y]^{\binom{p}{2}}.$$
Since $[x^{-1},y]$ is a member of $G'=Z(G)$, it is of order $p$ and for odd $p$, the integer $\binom{p}{2}=p(p-1)/2$ is multiple of $p$, so $[x^{-1},y]^{\binom{p}{2}}=1$. Also $y^px^{-p}=1$ (why?) Thus we get 
$$(yx^{-1})^p=1.$$
So, instead of $y$ you take new generator $y_1=yx^{-1}$; this is of order $p$, and we move in case (2.1), which is done!
