Question regarding the equivalence of two relations in a finite group given a subgroup 
Let $(G, \cdot)$ be a group and $H$ a finite subgroup of $G$ (i.e. $H \leq G, \lvert H \rvert = n \in \mathbb{N}^*)$. Prove the following two relations are equivalent ($e$ is the identity element):

*

*$\forall x, y \in G-H, x \neq y \implies xy \neq yx;$


*$(H, \cdot)$ is abelian, $\lvert G \rvert=2\lvert H \rvert, |Z(G)| = 1;$

I first assumed 2) then proved 1).
$$\begin{align*}
x \in G-H &\implies xh \in G-H, \forall h \in H.\\
 xh_1=xh_2 &\implies h_1=h_2, \forall h_1, h_2 \in H.\\\
 |G-H|=|H| &\implies G-H= \{ xh \mid h \in H \}
\end{align*}$$
Now we have
$$\begin{align*}
(xh_1)(xh_2)=(xh_2)(xh_1) &\implies h_2^{-1}h_1xh_2h_1^{-1}=e\\ &\implies (h_2^{-1}h_1)x(h_2^{-1}h_1)^{-1}=e.
\end{align*}$$
$(h_2^{-1}h_1)^{-1}=h_1^{-1}h_2=h_2h_1^{-1}$ because $(H, \cdot)$ is abelian. $gxg^{-1}=e$ has one solution, namely  $x=e$, when $g \in G$.
I did not use the fact that $Z(G)$ is trivial here and I have no idea how to prove 2) assuming 1). Is the question wrong or did I do a mistake?
 A: The argument you present is incorrect, which is why you seem to not use $Z(G)=1$. Your error is in the calculations, as noted by Anne Bauval. From
$$(xh_1)(xh_2) = (xh_2)(xh_1)$$
we cancel $x$ and deduce $h_1xh_2 = h_2xh_1$, which can be written as $(h_2^{-1}h_1)x = x(h_1h_2^{-1}) = x(h_2^{-1}h_1)$ or as $(h_2^{-1}h_1)x(h_2^{-1}h_1)^{-1}=x$, using the fact that $H$ is abelian.  You have $(h_2^{-1}h_1)x(h_2^{-1}h_1)^{-1}=e$, missing the $x$ on the right hand side.
The correct calculation tells you that $h_1h_2^{-1}$ commutes with $x$, and since it lies in $H$, its centralizer contains $\langle H,x\rangle = G$. Thus, $h_1h_2^{-1}\in Z(G)=\{e\}$, which proves $h_1=h_2$. We conclude that if $x,y\in G-H$ commute, then $x=y$.
Now, the statements as written are not equivalent, since one can take $G$ to be a finite nonabelian group, and $G=H$. Then (1) is true, but (2) is not. And if $H$ is trivial and $G=\mathbb{Z}_2$, then (1) is true (since you cannot find two distinct elements of $G$), but (2) is false because $Z(G)$ is not trivial.
So let us assume that $H$ is a proper subgroup of $G$, that $G\neq \mathbb{Z}_2$, and $G$ satisfies (1).
Note that if $x\notin H$, then $x^{-1}\notin H$, and since $x$ commutes with its inverse, then we must have $x=x^{-1}$. Thus, every element not in $H$ is of order $2$. If $H$ is trivial, then this means that $G$ itself is abelian; and because $G$ is not $\mathbb{Z}_2$, it contains two distinct nonidentity elements, and does not satisfy (1). So this is impossible. Thus, $H$ is nontrivial.
Now, suppose that $z\in Z(G)$. If $z\in H$, then letting $x\notin H$ and looking at $xz$ and $x$, which commute, we conclude that $z=1$. And if $z\notin H$, then taking any $h\in H$ we have that $zh\notin H$ commutes with $z$, so $h=1$. Since $H$ is nontrivial, this is a contradiction. We conclude that $Z(G)=1$.
Now, $H$ is normal: if $h\in H$ and $x\notin H$, then $xh$ is of order $2$, as is $x$, so $xh=(xh)^{-1} = h^{-1}x^{-1}=h^{-1}x$, so $xhx^{-1}=h^{-1}$. Thus, $H$ is normal in $G$.
Moreover, conjugation by $x$ is an automorphism of $H$, and as noted above it corresponds to the inversion map, and so we conclude that $H$ is abelian.
It only remains to show that $|G|=2|H|$. If $x$ and $y$ are both not in $H$, and $xy\notin H$, then $xy=(xy)^{-1}=yx$, so $x=y$, and then $xy=1\in H$. Hence this is impossible. So if $x,y\notin H$, then $xy\in H$. That means that the product of any two nontrivial elements of $G/H$ is the identity, so $G/H\cong \mathbb{Z}_2$. Thus, $[G:H]=2$, as desired.
Note that if you replace $|G|=2|H|$ with $[G:H]=2$, and you drop the assumption that $H$ is finite, the result still holds (once you add the additional assumptions).
