Let $S_2$, a group of two elements, act on $k[x,y]$ by permuting $x$ and $y$.
It is clear that $$ 0\rightarrow (x-y) \rightarrow k[x,y]\rightarrow \dfrac{k[x,y]}{(x-y)}\cong k[y] \rightarrow 0 $$ is exact.
Taking its invariant subrings, we obtain $$ 0\rightarrow (x-y)^{S_2} \rightarrow k[x,y]^{S_2}\rightarrow k[y]^{S_2},$$ which simplifies as
$$ 0\rightarrow (x-y)^{S_2} \stackrel{f}{\rightarrow} k[x+y,xy]\stackrel{g}{\rightarrow} k[y]. $$
What are $f$ and $g$ concretely?