I've been trying to show that the surface of genus $2$ can be represented by appropriately identifying the edges of a regular octagon. I think I have managed to work out the way to identify the edges but how can I prove that it is indeed of genus $2$? At the moment I can't think of anything except considering all possible combinations of three cuts, can someone give a hint as to a better method?
There is a generalization of Euler's $v-e+f=2$ which goes $v-e+f=2-2g$ for maps embedded in a surface of genus $g$. So just draw a map on your octagon, and count vertices, edges, and faces carefully.
A surface of genus 2 is the same as the connect sum of two surfaces of genus 1. Given that a surface of genus one can be represented as a certain boundary identification on the square, can you see how to 'cut out' a small piece from two of these squares, and then do a suitable combination of cuts and gluing until you end up with an octagon?
Note that you'll have to do some edge relabeling in order to bring the total number of edges down to 8.