This implication follows from the
conjugation formulas.
We write both g and h as a product of disjoint cycles
si and ti, respectively,
all of length at least 2.
Since g and h have the same cycle structure, we
can write g = s1 ···
sm and
h =
t1 ···
tm in such a way
that
si and ti
have equal length
for all i.
Suppose si =
(si1, si2, ...,
sipi) and
ti
=
(ti1, ...,
tipi).
Denote by k a permutation with
k(tij) = sij
for all i from 1 to m and j from 1 to
pi. This is possible since the supports
of the si are disjoint as well as the supports
of the ti.
(Notice that there may be more than one permutation k
satisfying these requirements.)
The conjugation formulas yield that
khk-1 = g.