A key fact of cyclic groups is that if $G$ is cyclic with order $n$, and $k|n$, then $G$ has only ONE subgroup of order $k$. So $\Bbb{Z}/p^3\Bbb{Z}$ has but a single subgroup of order $p$, namely $\langle[1]\rangle$. This subgroup contains ALL the elements of order $p$ (if there were another outside of it, it would generate another subgroup of order $p$).
Likewise, we have a sole subgroup of order $p^2$, which contains $\varphi(p^2) = (p-1)p$ generators, the other $p^2 - p(p-1) = p$ elements being the elements of order $p$ and the identity, $[0]$ (another way to see this is that the sole subgroup of $\Bbb{Z}/p^3\Bbb{Z}$ of order $p$ must likewise be the sole subgroup of order $p$ of the subgroup of order $p^2$, so subtracting out the $p-1$ elements of order $p$ and the identity, we have $p^2-p$ elements remaining, which must be of order $p^2$, the only possible order remaining). Again, there can be no other elements of order $p^2$ outside this subgroup, for if there were we would have at least TWO subgroups of order $p^2$.
Having accounted for all the elements of order $1,p$ and $p^2$, we see that we have $p^3 - p^2$ elements left, which must be of order $p^3$.
So, in finding (for example) the elements of order $p$ in $\Bbb{Z}/p^3\Bbb{Z} \times \Bbb{Z}/p^2\Bbb{Z}$, we note that either the element of the first factor is of order $p$ (and the element in the second group is of order $p$ or less), or the first element is the identity (of $\Bbb{Z}/p^3\Bbb{Z}$), and the second element is of order $p$. That gives us: $(p-1)p + p-1 = p^2 -1$ elements of order $p$ in $\Bbb{Z}/p^3\Bbb{Z} \times \Bbb{Z}/p^2\Bbb{Z}$.