Is the first part of the question the same as the working in this one I found on the net?

27.Let G, G1, G2 be groups. Prove that if G is isomorphic to G1 × G2, then there are subgroups H and K in G such that

(i) H K = { e },

(ii) HK = G, and

(iii) hk=kh for all h in H and k in K.Solution:Let µ : G1 × G2 -> G be an isomorphism. Exercise 3.3.9 in the text shows that in G1 × G2 the subgroups

H* = { (x1,x2) | x2 = e } and K* = { (x1,x2) | x1 = e } have the properties we are looking for.

Let H = µ (H*) and K = µ (K*) be the images in G of H* and K*, respectively. We know (by Exercise 3.4.15) that H and K are subgroups of G, so we only need to show that

H K = { e }, HK = G, and hk=kh for all h in H and k in K.

Let y be in G, with y = µ (x), for x in G1 × G2. If y is in H K, then y is in H, and so x is in H*. Since y is in K as well, we must also have x in K*, so x is in H* K*, and therefore x = (e1,e2), where e1 and e2 are the respective identity elements in G1 and G2. Thus y = µ ((e1,e2)) = e, showing that H K = { e }. Since y is any element of G, and we can write x = h* k* for some h* in H* and some k* in K*, it follows that y = µ (h* k*) = µ (h*) µ (k*), and thus G = HK. It is clear that µ preserves the fact that elements of H* and K* commute. We conclude that H and K satisfy the desired conditions.