Why is a reflection followed by another reflection is a rotation? I just started abstract algebra and we are working with dihedral groups. I've made Cayley tables for D3 and D4 but I can't explain why two reflections are the same as a rotation

Note that the mirror axis for both reflections passes through the center of the object. Therefore, the center remains in the same place throughout the process.
Next, since we've done two reflections, the final transformation is orientation-preserving. It turns out that the only rigid transformations that preserve orientation and fix a point $p$ are rotations around $p$. So our final transformation must be a rotation around the center.

For an intuitive proof of the above fact: imagine putting a thumbtack through the center of the square. Any transformation you can do to it now must fix the center (it's pinned in place!) and must preserve orientation (to flip the square over, you'd need to remove the tack). And with this tack in place, all you can do is rotate the square.
