The following steps lead to a solution:
(1) Let $\{H_{\alpha}\}_{\alpha\in A}$ be a collection of subgroups of a group $G$ where $A$ is an index set and let $H=\bigcap_{\alpha\in A} H_{\alpha}$ be their intersection. Prove directly from the definitions that $H$ is a subgroup of $G$. For example, if $x\in H$, then by definition of "intersection", $x\in H_{\alpha}$ for all $\alpha\in A$. Since $H_{\alpha}$ is a subgroup of $G$, we know that $x^{-1}\in H_{\alpha}$ for all $\alpha\in A$. In particular, $x^{-1}\in H$ since $H=\bigcap_{\alpha\in A} H_{\alpha}$.
(2) Prove similarly (and carefully) that if $x,y\in H$, then $xy\in H$. (Hint: think carefully about the definition of "intersection" and relate to the proof given in (1) above.)
The following exercises will strengthen your understanding of the concepts relevant to the the question you asked:
Exercise 1: Let $H,K\subseteq G$ be subgroups and supppose $H\cup K$ is also a subgroup of $G$. Prove that either $H\subseteq K$ or $K\subseteq H$. (Hint: prove this by contradiction. In particular, if neither of the alternatives in the second sentence holds, choose $x\in H$, $x\not\in K$ and $y\in K$, $y\not\in H$. Note that $x,y\in H\cup K$ and use the fact that $H\cup K$ is a subgroup of $G$.)
Exercise 2: Let $G$ be a group and let $x\in G$. The centralizer of $x$ in $G$ is the set $\textbf{C}_G(x)=\{g\in G:xg=gx\}$. Prove that $\textbf{C}_G(x)$ is a subgroup of $G$.
Exercise 3: Let $G$ be a group with the property that there do not exist three elements $x,y,z\in G$ no two of which commute. Prove that $G$ is abelian. (Hint: fix $x,y\in G$; in order to prove that $x$ and $y$ commute, write $G$ as the union of two appropriately chosen subgroups and appeal to Exercise 1 above. Exercise 2 is relevant.)
Exercise 4: Let $H$ and $K$ be subgroups of a group $G$ such that $HK=KH$. (Let me recall that $HK=\{hk:h\in H \text{ and } k\in K\}$ and $KH=\{kh:h\in H \text{ and } k\in K\}$.) Prove that $HK=KH$ is a subgroup of $G$. Conversely, if $HK$ (or $KH$) is a subgroup of $G$, prove that $HK=KH$. (Hint: the proof (like the solution to your question) is a simple manipulation of the definitions which you should carefully work through.)
Exercise 5: Let $H$ be a subset of $G$ such that for every proper subgroup $K$ of $G$, we have that $H\cap K$ is a subgroup of $G$. Is it necessarily true that $H$ is a subgroup of $G$?