How can I prove this?
Group generated by x, y where |x| = p, a prime, and |y| = 2 isomorphic to dihedral group if the group generated by x, y is of order 2p
This is a part of a larger proof.
I proved that all element of the group can be written uniquely x^my^n. (Unique meaning if x^my^n = g = x^m' y^n', then m = m' mod p and n = n' mod 2)
I was going to prove the following map was a group isomorphism.
f : G -> D_{2p} by g = x^my^n |-> r^mf^n
where r is a rotation and f is a flip in the dihedral group.
I can do everything if I can show (xy)^2 = e. But I am not sure how to do that, ive had a few failed attempts.

