if G is cyclic, it has only one subgroup of order p. since any element of order p generates a subgroup of order p, all elements of order p must generate the same subgroup of G (since G has only ONE subgroup of order p, because its cyclic). so all elements of order p must all lie in that one subgroup of order p, which has (of course) p-1 elements of order p.
now suppose that G has exactly p-1 elements of order p. pick one of them, say x, we have a cyclic subgroup of G of order p <x>. this is the ONLY subgroup of order p of G.
now suppose H is a subgroup of order p^2, which has to be cyclic, because the direct product of 2 subgroups of order p is not possible. let y be a generator of H. then y^p has order p, so y^p is in <x>. hence <x> is a subgroup of H.
now suppose that K is a subgroup of order p^3....can you see where this is going? show that any subgroup of order p^k has to be cyclic, or else it contains more than one subgroup of order p.
conclude that G must be cyclic.