Let $H$ be the set of all permutations $\alpha\in S_5$ satisfying $\alpha(2) = 2$. Which of the properties (closure, associativity, identity, inverses) does $H$ enjoy under composition of functions?
Solution:
Let $\alpha, \beta, \gamma \in H$.
Closure: For any $\alpha, \beta \in H$, we have $\alpha\beta(2)=\alpha(\beta(2))=\alpha(2)=2 $. Thus composition is closed.
Associativity: it's obvious that $(\alpha \beta) \gamma(2)=\alpha (\beta \gamma)(2)$
Identity: I guess it is the same as for $ S_5 $. Since it leaves the rest of the elements fixed and especially, at $ 2 $
Inverses: Since every permutation in $ H $ leaves $2$ fixed, its inverse also. So for every $ \alpha \in H $ there is an inverse.
I am right?
Your proof is fine.
Here's another . . .
It suffices to show that $H$ is a subgroup of $S_5$, since every subgroup of a group is itself a group.
I will use the one-step subgroup test.
Since the identity in $S_5$ fixes $2$ trivially, we have $H\neq\varnothing$.
Let $\sigma\in H$. Then $\sigma\in S_5$ such that $\sigma(2)=2$; so, in particular, $\sigma\in S_5$. Hence $H\subseteq S_5$.
Let $\sigma,\tau\in H$. Then $\sigma(2)=2$ and $\tau(2)=2$. Since $\tau$ is a bijection on $\{1,\dots, 5\}$ that fixes $2$, so is its inverse $\tau^{-1}\in H$ (because $$\begin{align} \tau^{-1}(2)&=\tau^{-1}(\tau(2))\\ &=(\tau^{-1}\tau)(2)\\ &={\rm id}_{S_5}(2)\\ &=2). \end{align}$$ We have
$$\begin{align} (\sigma\tau^{-1})(2)&=\sigma(\tau^{-1}(2))\\ &=\sigma(2)\\ &=2, \end{align}$$
but the composition of two bijections is a bijection, so $\sigma\tau^{-1}\in H$.
Hence $H\le S_5$.
Hence $H$ is a group.