Let $H = \{g \in S_6 : g(a)\equiv a\pmod3 \text{ for } a\in\{1,2,3,4,5,6\}\}.$ Is this a subgroup?
The identity element $\in H$ because for all $a \in \{1,2,3,4,5,6\}$, we have $h(a) ≡ a\pmod3$ as $h(a)-a=a-a = 0$ and $3|0$.
For closure, let $g,h \in H$. Then for all $a \in \{1,2,3,4,5,6\}$, we have $g(a)\equiv a\equiv h(a)\pmod3$. So for all $a \in \{1,2,3,4,5,6\}$, $(gh)(a)=g(h(a))$. Now this is where I am unsure how to proceed!!
I try for inverses anyway. Let $h \in H$. Then $h(a)\equiv a\pmod3$, so $h^{-1}(h(a))=\ldots$
Can I have some help please ?
Use the finite subgroup test.
You have $e\in H$, so $H\neq \varnothing$.
By definition, $H\subseteq S_6$.
For closure, suppose $g,h\in H$. Then for all $a\in \{1,2,3,4,5,6\}$, we have $\color{blue}{g(a)\equiv a}\pmod{3}$ and $\color{red}{h(a)\equiv a}\pmod{3}$. Now
$$\begin{align} (gh)(a)&=g(\color{red}{h(a)})\\ &\equiv g(\color{red}{a}\pmod{3})\\ &\equiv\color{blue}{g(a}\pmod{3}\color{blue})\\ &\equiv\color{blue}{a}\pmod{3}, \end{align}$$
so that $gh\in H$.
Hence $H$ is a subgroup of $S_6$