# How to apply the cellular boundary formula?

I have problems writing out my calculations of cellular homology groups.

According to Hatcher, the cellular boundary formula is

$d_n(e^n_\alpha)=\Sigma_\beta d_{\alpha \beta} e^{n-1}_\beta$ where $d_{\alpha \beta}$ is the degree of the map $S^{n-1}_\alpha \to X^{n-1} \to S^{n-1}_\beta$ that is the composition of the attaching map of $e^n_\alpha$ with the quotient map collapsing $X^{n-1}-e^{n-1}_\beta$ to a point.

How would I then write the calculation of the boundary maps of for example $\mathbb RP^2$?

My considerations so far were:

$\mathbb RP^2$ has the fundamental polygon

Hence it has a cell structure with one $2$-cell ($e^2$), two $1$-cells ($A$,$B$) and two $0$-cell ($x,y$).

When calculating $d_2$ with $\Delta_A$ the composition of the attaching map $\varphi$ of $e^2$ with the quotient map $q$ collapsing $X^{n-1}-A$ to a point, does it make sense to write that $$\Delta_A(\partial e^2)=q(\varphi(\partial e^2))=q(ABAB)=AA?$$ And how would I then argue that $deg(\Delta_A)=2$?

Update:

After looking at some solutions, I can now calculate the homology groups of $\mathbb RP^2$,

I say that the cells generate the chain groups, so $C_2=<e^2>$, $C_1=<a,b>$, $C_0=<x,y>$. Theny by simply looking at the fundamental polygon, I can say that $$d_2(e^2)=A+B+A+B=2A+2B,\\d_1(A)=x-y,\\d_1(B)=y-x.$$ So $$H_2(\mathbb RP^2)=\ker d_2=0,\\H_1(\mathbb RP^2)=\ker d_1 / \operatorname {im} d_2=<A+B| ~2A+2B> \approx \mathbb Z_2 \\ H_0(\mathbb RP^2)= \ker C_0/ \operatorname {im} d_1 = <x,y|~x-y>\approx \mathbb Z,$$ which is the right result.

However, I still dont get why this is the right way to calculate the boundary maps and how this is related to the formula givern in Hatcher.

Start with a fundamental polygon with sides $A,B,C,D$ and vertices $x,y,z,w$ and calculate the boundary maps as before. So e.g. $$d_2(e^2)=A+B+C+D.$$ Then the quotient map, which identifies $A$ with $C$ and $B$ with $D$ is a local homeomorphism and we can use local degrees in order to calculate the degree of $\Delta_A$. So indeed, $deg(\Delta_A)=2$, because both maps from $A$ to $S^1$ and from $C$ to $S^1$ have degree $1$.