# Show isomorphism between two groups

## Homework Statement

Suppose G is a non-abelian group of order 12 in which there are exactly two
elements of order 6 and exactly 7 elements of order 2. Show that G is isomorphic to the
dihedral group D12.

## The Attempt at a Solution

My attempt (and what is listed in the official solutions) was to first consider the cyclic group generated by an element of order 6 in group G. Thus, this cyclic group has order 6. Consider the elements in G \ <x> (complement of G and <x>); this subgroup has index 2(but the problem here its not even a subgroup since it has no identity element); so all the elements of G \ <x> has order 2(deduced from the hypothesis) and is a normal subgroup so by definition of normal subgroups, yxy^-1 = x^-1 is satisfied and G can be written as {x^6 = 1 , y^2 = 1 such that yxy^-1 = x^-1} which is precisely the same group structure as D12 => isomorphic.

I'm certain that there is a crucial flaw here and a correct proof or a way to fix the existing proof is very much appreciated.