For any element $g$ of $G,$ where $g$ has order $2,$ define $gH=\{gh│h∈H\}$. Prove that the set $K=H∪gH$ is a subgroup of $G.$ Does this solution make sense?

Let $G$ be an abelian group and $H$ a subgroup. For any element $g$ of $G,$ where $g$ has order $2$, define $gH=\{gh│h∈H\}$. Prove that the set $K=H∪gH$ is a subgroup of $G$.  

Since $g \in G$ and $H$ is a subgroup of $G,$ then $gH$ is a subgroup of $G.$
This just leaves the proof that $K=H\cup gH$ is a subgroup of $G.$
Suppose $H ⊆ gH$ or $gH ⊆ H.$ Then $H∪gH = gH$ or $H∪gH = H.$ In either case $H∪gH ≤ G$ as $H, gH ≤ G.$
Suppose that $H∪gH ≤ G.$ To show that $H ⊆ gH$ or $gH ⊆ H$ we need only show $H \subsetneq gH$ implies $gH ⊆ H.$
Suppose $H \subsetneq gH$. Then there is an $h ∈ H$ such that $h \notin gH$. Let $k ∈ gH,$ then $h, k ∈ H∪gH$, which means $hk ∈ H∪gH$ since $H∪gH ≤ G$.
If $hk ∈ gH$ then $h = he = h(kk^{−1}) = (hk)k^{−1} ∈ gH$, which is a contradiction.
Therefore $hk ∈ H$ which means $k = ek = (h^{−1}h)k = h^{−1}(hk) ∈ H$.
We have shown $gH ⊆ H,$ which means $H\cup gH=K\subseteq H$.
Since $H$ is a subgroup of $G$, and $K\subseteq H$, then $K$ is a subgroup of $G.$

2nd attempt using replies from @MGN and @CameronBuie

One-Step Group Test definition applied to my problem:
  Let G be a group and K a nonempty subset of G.$\space \space$If $ab^{-1}$ is in K whenever a and b are in K, then K is a subgroup of G.  

But this is a misnomer since I have four steps:  


*1. Identify a property that distinguishes the elements of K

The property that defines the elements of K is that they are the union of the elements of H and the elements of gH.


*2. Prove that the identity has this property

Since $g \in G$ has order 2, then $g^{-1}=g$.$\space \space$The identity $e$ is a solution of $g^{-1}=g$.$\space \space$H is a subgroup of G, so H is abelian and contains the identity as well.$\space \space$Therefore, gH contains the identity.  Thus, the union of H and gH contains the identity.


*3. Assume that two elements $a$ and $b$ have this property

Assume that $a,b$ are contained in the union of H and gH.


*4. Use the assumption that $a$ and $b$ have this property to show that $ab^{-1}$ had this property

Since H is already defined as a subgroup, $ab^{-1}\in H$ for all $a,b\in H$.$\space \space$Since G and H are both abelian, then gh=hg.$\space \space$Also, g has order 2, so $g^{-1}h=gh=hg=hg^{-1}$, showing that gH contains the form $ab^{-1}$ for elements a and b in gH when a=h and b=g.$\space \space$Thus the union of H and gH contains $ab^{-1}$
Therefore, K is a subgroup of G.

3rd attempt

One-Step Group Test definition applied to my problem:
  Let G be a group and K a nonempty subset of G.$\space \space$If $ab^{-1}$ is in K whenever a and b are in K, then K is a subgroup of G.  

But this is a misnomer since I have four steps:  


*1. Identify a property that distinguishes the elements of K

The property that defines the elements of K is that they are the union of the elements of H and the elements of gH.


*2. Prove that the identity has this property

Since $g \in G$ has order 2, then $g^{-1}=g$.$\space \space$H is a subgroup of G, so H is abelian and is nonempty.$\space \space$Thus, since $K=H∪gH$, we have $H⊆K$, so we can conclude that K is nonempty.


*3. Assume that two elements $a$ and $b$ have this property

Assume that $a,b$ are contained in the union of H and gH.


*4. Use the assumption that $a$ and $b$ have this property to show that $ab^{-1}$ has this property.


* 
*Case #1: If $a,b\in H$, then $ab^{−1}\in H$ since H is a subgroup of G.$\space \space$Also, $a,b\in K$ and $ab^{−1}\in K$ since H is a subset of K.  

* Case #2: If $a\in H$ and $b\in gH$, then $ag\in gH$.$\space \space$Also, $\exists h\in H$ such that b=gh and $b^{-1}=g^{-1}h^{-1}$. $\space$So $ab^{-1}=agg^{-1}h^{-1}=ah^{-1}$ $\space$Since G is abelian, then $ab=ah^{-1}$. $\space$ since $H\subseteq G$ and $h\in H$, then $h^{-1}\in H$. $\space$Thus if $a\in H$, $b\in gH$, then $ab^{-1}\in H$, so $ab^{-1}\in K$ since $H\subseteq K$.  

* Case #3: If $a\in gH$ and $b\in H$, then $\exists h\in H: a=gh$ and $bg\in gH$.$\space$
Then $b^{-1}=b^{-1}g^{-1}.$
So $ab^{-1}=ghb^{-1}g^{-1}=hb^{-1}.$
Since $H\subseteq G$ and $b\in H$, then $b^{-1}\in H$.
Thus, if $a\in gH$ and $b\in H$, then $ab^{-1}\in H$, so $ab^{-1}\in K$

* Case #4: If $a,b\in gH$, then there exist $h_1,h_2\in H$ such that $a=gh_1$ and $b=gh_2$.$\space$ Then $b^{−1}=h^{−1}_{2}g^{−1}$, and so $ab^{−1}=gh_{1}h^{−1}_{2}g^{−1}$. Since G is abelian, then $ab=gg^{−}1h_{1}h^{−1}_{2}=h_{1}h^{−1}_{2}$. Since H is a subgroup of G and $h_{1},h_{2}\in H$, then $h_{1}h^{−1}_{2}\in H$. Thus, if $a,b\in gH$, then $ab^{−1}\in H$, and so $ab^{−1}\in K$.
 A: This is one of those places where the details hide the picture.
Suppose $G$ is a group (not necessarily abelian), with $A$ and $B$ subgroups of $G$. We can define
$$
AB=\{ab:a\in A,b\in B\}=\bigcup_{a\in A} aB = \bigcup_{b\in B} Ab
$$

If $B$ is a normal subgroup of $G$, then $AB$ is a subgroup of $G$

Indeed, $1$ obviously belongs to $B=1B\subseteq AB$. Suppose $a_1,a_2\in A$ and $b_1,b_2\in B$. We wish to prove that
$$
(a_1b_1)(a_2b_2)^{-1}\in AB
$$
Now
$$
(a_1b_1)(a_2b_2)^{-1}=
a_1b_1b_2^{-1}a_2^{-1}=
(a_1a_2^{-1})\bigl(a_2(b_1b_2^{-1})a_2^{-1}\bigr)
$$
We know that $a_1a_2^{-1}\in A$; moreover $b_1b_2^{-1}\in B$ and its normality allows us to say that also $a_2(b_1b_2^{-1})a_2^{-1}\in B$. So we're done.
In your case $A=\langle g\rangle=\{1,g\}$ (which is true because $g$ has order $2$) and $B=H$, which is of course normal because $G$ is abelian; thus
$$
\langle g\rangle H=H\cup gH
$$
as stated.

A direct proof would be as follows. Note that $g^2=1$ implies $g=g^{-1}$.
(a) $1\in H$, so $1\in H\cup gH$
(b) Suppose $x,y\in H\cup gH$. There are four cases


*

*$x,y\in H$: then $xy\in H$

*$x\in H$, $y=gh\in gH$: then $xy=g(xh)\in gH$

*$x=gh\in gH$, $y\in H$: then $xy=g(hy)\in gH$

*$x=gh_1\in gH$, $y=gh_2\in gH$: then $xy=g^2h_1h_2=h_1h_2\in H$.
(c) If $x\in H$, then $x^{-1}\in H$; if $x=gh\in gH$, then $x^{-1}=h^{-1}g^{-1}=g^{-1}h^{-1}=gh^{-1}\in gH$.
A: In general, given $g\in G$ and $H\le G,$ we have that $gH\le G$ if and only if $g\in H.$ Apply a subgroup test to figure out why. That's the primary flaw, here. Without knowing that $gH$ is closed under the group operation, you run into difficulties later on.
Another issue is the claim that since $K\subseteq H$ and $H\leq G,$ then $K\leq G.$ This need not be true in general. However, since $H\subseteq K$ by definition, you should in fact have deduced that $H=K,$ whence the conclusion would follow (were it not for the earlier error).
One thing that should raise a red flag, here, is that you never used the hypothesis that $g$ has order $2$ (meaning that $g^{-1}=g$), nor the hypothesis that $G$ is abelian. These turn out to be quite important.
Instead of the approach style you were taking, I recommend that you simply apply a subgroup test to $K.$ The assumptions about $g$ and $G$ will each be used at least once.

Edit: Let me provide some critique and advice on your posted proof attempt.

Since $g \in G$ has order 2, then $g^{-1}=g$.

Looks good so far.

The identity $e$ is a solution of $g^{-1}=g$.

Not at all. We chose $g$ to be a specific element of $G$ having order 2. The equation $g^{-1}=g$ is simply a fact about $g,$ not an equation with solutions. It is true that $e^{-1}=e,$ but that has nothing to do with $g,$ nor with $H,$ nor with $K.$

$H$ is a subgroup of $G,$ so $H$ is abelian and contains the identity as well.

Very true.

Therefore, $gH$ contains the identity.

Why should this be true? Every element of $gH$ looks like $gh$ for some $h\in H.$ The only way to know that $e\in H$ is if $g^{-1}\in H,$ so that $e=gg^{-1}\in gH.$ But this will only happen if $g\in H$ (this gets back to that "primary flaw" I mentioned above), which we must not assume.
More simply, note that $H$ is a subgroup of $G,$ so $H$ is nonempty. Thus, since $K=H\cup gH,$ we have $H\subseteq K,$ so what can we conclude about $K$?

Assume that $a,b$ are contained in the union of $H$ and $gH.$
Since H is already defined as a subgroup, $ab^{-1}\in H$ for all $a,b\in H$.

Oops! Be careful. You've taken $a,b\in K$ to be arbitrary. You should no longer treat them as variables. Instead, note that if $a,b\in H$ (which is one of four possibilities to consider), then $ab^{-1}\in H$ since $H$ is a subgroup of $G$, and so $ab^{-1}\in K$ since $H$ is a subset of $K$.

Since $G$ and $H$ are both abelian, then $gh=hg.$

What is $h$? It seems like it is supposed to be some element of $H$, but where did it come from? What is it for?

Also, $g$ has order $2,$ so $g^{-1}h=gh=hg=hg^{-1}$,

Where in the world is the $g^{-1}h$ coming from?

showing that $gH$ contains the form $ab^{-1}$ for elements $a$ and $b$ in $gH$ when $a=h$ and $b=g.$

Well, certainly, if $a\in H$ and $b=g,$ we readily have $ab^{-1}=ag^{-1}=ag=ga\in gH$, so that $ab^{-1}\in K.$ Unfortunately, this does not complete the proof. Moreover, remember that $ab^{-1}$ is a specific group element, not a form.
Remember those four possibilities I memtioned earlier? Since we took $a,b\in K=H\cup gH$ to be arbitrary, then we must address the possibilities: (1) $a,b\in H,$ (2) $a\in H$ and $b\in gH,$ (3) $a\in gH$ and $b\in H,$ (4) $a,b\in gH.$ You nearly addressed (1) in your proof, as I discussed above. Let me show you how we might address (4), and then you should try to address (2) and (3).

If $a,b\in gH,$ then there exist $h_1,h_2\in H$ such that $a=gh_1$ and $b=gh_2.$ Then $b^{-1}=h_2^{-1}g^{-1},$ and so $ab^{-1}=gh_1h_2^{-1}g^{-1}.$ Since $G$ is abelian, then $ab^{}=gg^{-1}h_1h_2^{-1}=h_1h_2^{-1}.$ Since $H$ is a subgroup of $G$ and $h_1,h_2\in H,$ then $h_1h_2^{-1}\in H.$ Thus, if $a,b\in gH,$ then $ab^{-1}\in H,$ and so $ab^{-1}\in K.$

See what you can do with cases (2) and (3). Feel free to run your attempts by me. Let me know if you have any questions or confusion about what I've written.

Your third attempt looks quite a bit better, but cases (2) and (3) are a bit problematic. There are also two typos in (4), and there's no need to mention that $a,b\in K$ in (1), just that $ab^{-1}\in K.$ Let me address (3), which has more issues. See what you can do with (2).

If $a\in gH$ and $b\in H$, then $\exists h\in H: a=gh$

Great start!

and $bg\in gH$.

This is certainly true, since $G$ is abelian and $b\in H$ (which are facts worth mentioning).

Then $b^{-1}=b^{-1}g^{-1}.$

Not at all. That would mean $g^{-1}=e,$ which means $g=e,$ which is impossible, since $g$ has order $2$.

So $ab^{-1}=ghb^{-1}g^{-1}=hb^{-1}.$

Since that $g^{-1}$ shouldn't be in there, you should have $ab^{-1}=ghb^{-1}$.

Since $H\subseteq G$ and $b\in H$, then $b^{-1}\in H$.

I think you mean to say that $H$ is a subgroup of $G$, not just a subset. Also, we have $h,b\in H,$ and so $hb^{-1}\in H.$

Thus, if $a\in gH$ and $b\in H$, then $ab^{-1}\in H$ so $ab^{-1}\in K$.

Do you see what needs to be changed here, due to the changes above?
A: As has been noted in the comments, $gH$ needn't be a subgroup of $G$, so the above proof won't go through.  Try checking directly the properties that would make the set $H \cup gH$ a subgroup:
1) It certainly contains the identity, because $H$ must contain the identity as a subgroup itself.
2) It's closed under multiplication: elements from this set all look like either $gh$ or just $h$ where $h \in H$.  Why is it when I multiply any two elements of this form, it still lies in $H \cup gH$?  Hint: the group is abelian.
3) It contains inverses.  Pretty clearly any element $h \in H$ has an inverse in $H \cup gH$ (in particular it has an inverse in just $H$), since again $H$ is a subgroup.  What about an element of the form $gh$?  Can you construct an inverse for $gh$ which is an element of your set $H \cup gH$?  Hint: $g$ is order two, which is another way of saying that it's its own inverse.
