Here is a more detailed explanation of the construction suggested in Tobias Kildetoft's answer. Consider $S_n$ as a subgroup of $S_{n+2}$ in the obvious way (namely, as the permutations of $\{1,\dots,n+2\}$ that fix $n+1$ and $n+2$), and let $t\in S_{n+2}$ be the transposition that swaps $n+1$ and $n+2$. Note that $t$ commutes with every element of $S_n\subset S_{n+2}$. Define a map $\varphi:S_n\to S_{n+2}$ by $\varphi(x)=x$ if $x$ is an even permutation and $\varphi(x)=xt$ if $x$ is an odd permutation. Then $\varphi$ is a homomorphism:
- If $x$ and $y$ are even, then $xy$ is even, and $\varphi(xy)=xy=\varphi(x)\varphi(y)$.
- If $x$ is odd and $y$ is even, then $xy$ is odd and $\varphi(xy)=xyt=xty=\varphi(x)\varphi(y)$ (here we use that $t$ commutes with every element of $S_n$).
- If $x$ is even and $y$ is odd, then $xy$ is odd, and $\varphi(xy)=xyt=\varphi(x)\varphi(y)$.
- If $x$ and $y$ are odd, then $xy$ is even, and $\varphi(xy)=xy=xyt^2=xtyt=\varphi(x)\varphi(y)$ (here we use that $t^2=1$ and $t$ commutes with every element of $S_n$).
It is also clear that $\varphi$ is injective, because $\varphi(x)$ maps $\{1,\dots,n\}$ to itself for any $x\in S_n$ and we can recover $x$ as the restriction of $\varphi(x)$ to $\{1,\dots,n\}$. Finally, the image of $\varphi$ is contained in $A_{n+2}$, since if $x$ is even, then $\varphi(x)=x$ is even, and if $x$ is odd, then $\varphi(x)=xt$ is even since $t$ is odd.
Thus $\varphi$ is an isomorphism from $S_n$ to the subgroup $\varphi(S_n)\subseteq A_{n+2}$.