Let $H,K$ be subgroups of $G$. Show that if $G$ has elements $x,y$ such that $xH=yK$, then $H=K$. 
Let $H,K$ be subgroups of $G$. Show that if $G$ has elements $x,y$ such that $xH=yK$, then $H=K$.

Suppose that $G$ has elements $x,y$ such that $xH=yK$. Let $h \in H$, then $xh \in xH = yK$ and $$xh \in yK \iff y^{-1}xh =(y^{-1}x)h  \in K$$ but $y^{-1}x \in G$ so $h \in K$.
Is this a correct reasoning? I think that the other direction is identical if so.
 A: 
Is this a correct reasoning?

No, as you've written it doesn't make sense, because $y^{-1}x\in G$ doesn't mean that $h\in K$.
If $xH=yK$ then $xe=x=yq$ for some $q\in K$, so $y^{-1}x=q\in K$. Once you've shown that your argument works because $K$ is a subgroup so because $qh\in K$, and $q\in K$, we can conclude that $q^{-1}qh=h\in K$, and so for all $h\in H$, $h\in K$.

I think that the other direction is identical if so.

Obviously you don't need to rewrite the whole argument out again with $x$ and $y$ swapped, just say "and vice-versa" or "by symmetry" or something.
A: As noted, your reasoning is not correct.
As to a proof, while you can do one with double inclusion, you can also prove it here more directly.
If $xH=yK$, then $x^{-1}xH = x^{-1}yK$, so $H=x^{-1}yK$. That means that $e\in x^{-1}yK$, and therefore that $x^{-1}yK = eK = K$. So $H=K$.
As an alternative way to finish it off, if $H=x^{-1}yK$, then the coset $x^{-1}yK$ of $K$ is a subgroup of $G$; since the only coset that is a subgroup is the subgroup itself, then $H=x^{-1}yK=K$.
