# If $M$ is maximal subgroup of $G$ and $H$ is a subgroup of $G$. Then $H\leq M$ or $\langle H\cup M\rangle=G$?

I want to prove if $$M$$ is maximal subgroup of $$G$$ and $$H$$ is a subgroup of $$G$$, then $$H\leq M$$ or $$\langle H\cup M\rangle=G.$$

So there are two cases to consider. When $$H\leq M$$ and $$H\not\leq M$$. We need to show if $$H\not\leq M$$, then $$\langle H\cup M\rangle=G$$. To show this, I tried to use a contradiction that if there exists an element $$g\in G$$ such that $$g\not\in \langle H\cup M\rangle$$, then a contradiction. However I couldn't reach a contradiction. Any help is appreciated.

You were having a good idea. If there is $$g \not \in \langle H \cup M\rangle$$, then $$\langle H \cup M\rangle\neq G$$ is a subgroup and it strictly contains $$M$$. This is against the maximality of $$M$$.
Well, if $$H$$ is not contained in $$M$$, then $$\langle H\cup M\rangle$$ is a subgroup of $$G$$ which contains $$M$$ as a proper subgroup. Since $$M$$ is maximal, it follows that $$\langle H\cup M\rangle =G$$.
I think a less stressful approach would be to start by observing that $$H'=\langle H\cup M\rangle$$ is a subgroup of $$G$$. Since $$M$$ is a maximal subgroup of $$G$$, that gives us either that $$H'=M$$ or $$H'=G$$. Then proceed towards your conclusion.