I can show that if H, K < G and HK = KH then HK < G. That's easy. I am having trouble with the other direction: If H, K < G and HK < G then HK = KH.
Here's what I have. (The language may not be quite as precise as it needs to be.)
We know that

, where h is in H and k is in K, by definition. Since HK is a group we also know that
^{-1} \in HK)
. But
^{-1} = k^{-1}h^{-1} \in KH)
. Since h and k are arbitrary in H and K respectively we can state that HK = KH.
My difficulty with this line of reasoning is that I suspect myself of assuming that KH is also a subgroup of G. Does my argument have any flaws? Thanks.
-Dan