Another presentation of a surface group Let $S$ be a connected orientable closed genus $2$ surface. Its fundamental group admit a presentation which is
$$\pi_1(S)=\langle a,b,c,d\ |\ [a,b][c,d]\rangle.$$
This presentation is related to the consctruction of $S$ by gluing a regular octagon like this:

We can also glue the opposite side of an octagon and we still end up with a genus $2$ surface:

My question is:
What is the presentation of $\pi_1(S)$ associated to this gluing? Can we describe the correspondence for the two generating sets?
 A: For your first question: You get the relator for the new gluing in just the same way that you got the original relator, namely, by starting at some vertex of the octagon, walking around the periphery of the octagon, and writing the edges in order with exponent $+1$ if the arrow is oriented in the same direction that you are walking, $-1$ if not. When you return to where you started, you have written the relator. The result, when done with the new gluing diagram, starting from the vertex at around 8:00 on the clock, and walking in the counterclockwise direction, is the presentation
$$\langle Y, G, B, R \mid Y \, G \, B \, R \, Y^{-1} \, G^{-1} \, B^{-1} \, R^{-1} \rangle
$$
I've named the generators using the colors of the edges in your picture.
This procedure works for any polygon gluing diagram having a single vertex cycle. The procedure is a bit more complicated if there are $k \ge 2$ vertex cycles: you must choose $k-1$ of edges such that among them those edges hit every vertex cycle; then you must omit those edge labels from the relator.
For your second question: You can describe a correspondence between the generators (it is not unique). In other words you can describe a function which associates to each letter of the second generating set $\{Y,B,G,R\}$ a word in the letters of the first generating set and its inverses $\{a,b,c,d,a^{-1},b^{-1},c^{-1},d^{-1}\}$, such that the input letter and the output word represent the same element of $\pi_1(S,p)$.
To do this, as a preliminary step you need to draw in the missing arrows on your bottom right diagram.
Now take the four loops $Y,G,B,R$ in your bottom right diagram, one at a time. And for each of them, visualize homotoping it to a closed path in the $a,b,c,d$ graph.
One is pretty easy: $B \mapsto c^{-1}$. The only tricky part here is that you did not yet draw an arrow on $B$, but if you work through it carefully you'll see that the arrows on $B$ and on $c$ point in opposite directions.
The next one is almost as easy:  $Y \mapsto a^{-1} \, d$.
I'll leave $G$ and $R$ to you, because it's kinda fun.
