Question about relation between Homotopy group, Homology group and Cohomology group I have the following question, shown in this picture:

Can you help me with constructing the group structure on $\pi(X, S^1)$ and showing that the homomorphism is an isomorphism?
Thank you very much.
 A: Like Thomas Rot points out in their comment, the set $\pi(X, S^1)$ of pointed homotopy classes inherits a group structure from the group structure on $S^1$ (considered as the space of complex numbers with norm $1$).
Here are some hints for showing 3):
Let $X^{(1)}$ be the $1$-skeleton of $X$. Since $X$ is connected, WLOG we can assume $X$ has a single $0$-cell so that all of the $1$-cells form loops. Note that, in terms of cellular homology, $H_1(X)$ is generated by oriented $1$-cells, and a linear combination of $1$-cells vanishes if it bounds a linear combination of $2$-cells.
Consider a homomorphism $\varphi\colon H_1(X) \to H_1(S^1)$. We can use this homomorphism to construct a pointed continuous function $f_\varphi\colon X^{(1)} \to S^1$. In order to prove surjectivity of $\pi(X, S^1) \to H^1(X;\mathbb{Z}) \cong Hom(H_1(X), H_1(S^1))$ show that such an $f_\varphi$ arising from any homomorphism $\varphi$ extends continuously to all of $X$. (Hint: for a $2$-cell $D$ in $X$, what is the obstruction to extending $f_\varphi$ over $D$?)
For injectivity, consider $f\colon X \to S^1$ such that $f_* = 0\colon H_1(X) \to H_1(S^1)\cong \pi_1(S^1)$. In particular for any $1$-cell $\alpha$ in $X$ the loop $f(\alpha)$ is null-homotopic in $S^1$. Now you need to show that the map $f$ itself is null-homotopic. (This is a general principle: if $f\colon X \to S^1$ induces $0\colon \pi_1(X) \to \pi_1(S^1)$ then $f$ is null-homotopic. One way of seeing this is by lifting $f$ along the universal cover $\mathbb{R} \to S^1$.)
