- The reflection $M:(x,y) \mapsto (x,-y)$ generates $\mathbb Z/2 \mathbb Z$ because $M^2 = I$ (note also that $M^{-1} = M$).
- The translation $T(a,b):(x,y)\mapsto(x+a,y+b)$ is free (unless it's the identity) so it generates $\mathbb Z$ (and note that $T(a,b)^{-1} = T(-a,-b)$).
Furthermore we have $M\circ T(a,b) = T(a,-b) \circ M.$
Now $f = M T(1/2,0)$ and $g = T(0,1)$ so we already completely understand these elements on their own and how they commute. The result is that we can create a notion of "normalized form" which is syntactically unique for equal elements. Before defining it formally I will show an example:
$\begin{align*} \bullet\ fgf^{-1}g &= M\circ T(1/2,0)\circ T(0,1)\circ M\circ T(-1/2,0)T(0,1)\\ &= M\circ T(1/2,0)\circ M\circ T(0,-1)\circ T(-1/2,0)\circ T(0,1)\\ &= M\circ M\circ T(1/2,0)\circ T(-1/2,0)\circ T(0,-1)\circ T(0,1)\\ &= I.\end{align*}$
If you shuffle all the mirrors to the very left and all the y-axis translations to the very right we are left with something of the form $M^i\circ T(r\cdot 1/2)\circ T(0,s)$ where $i = 0,1$ and $r,s \in \mathbb Z$ this is a normal form in the sense that every element can be reduced to it - and if two elements are equal they have syntactically equal normal form. First of all it's obvious that we can reduce every element to this form since we know how to commute elements, secondly we can see that if two elements are equal they have equal normal form because were any $i,r$ or $s$ different we would have different elements!
The group structure is completely understood now, you could even write it as a "presentation" \langle m,s,r\mid m^2 = I, sm = ms'\rangle (I'm not completely sure if I used this syntax right so don't take my word for anything). Of course what I said is quite general and you can use the idea of a normal form to deal with lots of groups in the $\mathbb R^n$.