EDIT: I decided to add a corrected version of the proof for the sake of future visitors. The two answers below refer to the first version of the proof, not the second, corrected one.
I am trying to prove the following statement: If X is a simply-connected, path-connected Hausdorff topological space then $[\mathbb{T}^2,X]\cong\pi_2(X)$.
I would like to know:
A) Is the statement correct? If it is false, what kind of additional restrictions have to be put on $X$ to make it correct?
B) Is the following proof correct?
C) I am searching for references (hopefully all from the same textbook) for why step # 3 is true. So far I have checked Bredon and Hatcher but perhaps there is a better suited source? Since I am a novice perhaps I am just not connecting the dots correctly.
Proof (second, corrected version): Writing $\mathbb{T}^2\cong\mathbb{S}^1\times\mathbb{S}^1$, we follow Mark Grant.
1) Since $\mathbb{T}^2$ is a CW-complex, it has a cell-structure, in which there is a 0-cell which is just a point, there is a figure-eight space $\mathbb{S}^1\vee\mathbb{S}^1$ where the two circles meet at the aforementioned point. $\mathbb{S}^1\vee\mathbb{S}^1$ is the 1-skeleton of $\mathbb{T}^2$, so that it is a one-dimensional sub-complex. This implies that the inclusion map $\mathbb{S}^1\vee\mathbb{S}^1\hookrightarrow\mathbb{T}^2$ is a cofibration (in the sense of [Bredon Def. VII.1.2]) by [B. Cor. VII.1.4].
2) Together with the attaching map $\mathbb{S}^1\to\mathbb{S}^1\vee\mathbb{S}^1$ we get the coexact sequence $$ \mathbb{S}^1\to\mathbb{S}^1\vee\mathbb{S}^1\to\mathbb{S}^1\times\mathbb{S}^1 $$ Suspension allows us to extend this sequence coexactly (via Bredon Cor VII.5.5) to get $$ \mathbb{S}^1\to\mathbb{S}^1\vee\mathbb{S}^1\to\mathbb{S}^1\times\mathbb{S}^1\to\mathbb{S}^2\to\mathbb{S}^2\vee\mathbb{S}^2\to\mathbb{S}^2\times\mathbb{S}^2\to\dots $$ where the first map is the attaching map and the fourth map is the suspension of the attaching map.
3) The suspension of the attachment map is nullhomotopic. Indeed, suspension induces a group morphism $\pi_1(\mathbb{S}^1\vee\mathbb{S}^1)\to\pi_2(\mathbb{S}^2\vee\mathbb{S}^2)$. Using the fact that $\pi_1(\mathbb{S}^1\vee\mathbb{S}^1)$ is the free group on two generators $\alpha,\beta$, the attaching map induces an element in $\pi_1(\mathbb{S}^1\vee\mathbb{S}^1)$ which may be written as $\alpha\beta\alpha^{-1}\beta^{-1}$. Now the group morphism property of the induced map $\pi_1(\mathbb{S}^1\vee\mathbb{S}^1)\to\pi_2(\mathbb{S}^2\vee\mathbb{S}^2)$ means and the fact that $\pi_n(Y)$ is Abelain for $n\geq2$ means $\alpha\beta\alpha^{-1}\beta^{-1}$ is sent to the identity element under this map.
Using co-exactness, $\pi_1(X)=0$, and the fact that the suspension of the attaching map is nullhomotopic, we find the following exact sequence of pointed homotopy classes: $$\dots\to0\to\pi_2(X)\to[\mathbb{T}^2;X]\to[\mathbb{S}^1\vee\mathbb{S}^1;X]\to0$$ where we also replaced $[\mathbb{S}^2;X]\equiv\pi_2(X)$.
4) The wedge sum $\mathbb{S}^1\vee\mathbb{S}^1$ is a coproduct in the category of (homotopy) pointed top. spaces and so the functor $[-;X]$ respects it, and so we get the equality $[\mathbb{S}^1\vee\mathbb{S}^1;X]=[\mathbb{S}^1;X]\times[\mathbb{S}^1;X]\equiv\pi_1(X)^2$. But we assumed $\pi_1(X)=0$ so that finally we get the exact sequence $$\dots\to0\to\pi_2(X)\to[\mathbb{T}^2;X]\to0$$
5) Since $X$ is path-connected, we may replace $[-;X]$ (the set of pointed homotopy classes) with the set of homotopy classes.
Proof (first version): Writing $\mathbb{T}^2\cong\mathbb{S}^1\times\mathbb{S}^1$, we follow the strategy of Mark Grant.
1) Since $\mathbb{T}^2$ is a CW-complex, it has a cell-structure, in which there is a 0-cell which is just a point, there is a figure-eight space $\mathbb{S}^1\vee\mathbb{S}^1$ where the two circles meet at the aforementioned point. $\mathbb{S}^1\vee\mathbb{S}^1$ is the 1-skeleton of $\mathbb{T}^2$, so that it is a one-dimensional sub-complex. This implies that the inclusion map $\mathbb{S}^1\vee\mathbb{S}^1\hookrightarrow\mathbb{T}^2$ is a cofibration (in the sense of [Bredon Def. VII.1.2]) by [B. Cor. VII.1.4].
2) Since $\mathbb{S}^2\cong\mathbb{T}^2/(\mathbb{S}^1\vee\mathbb{S}^1)$ we can also use [B. Cor. VII.5.5] to deduce that since $\mathbb{S}^1\vee\mathbb{S}^1$ is closed in $\mathbb{T}^2$, the sequence $$ \mathbb{S}^1\vee\mathbb{S}^1 \to \mathbb{T}^2\to\mathbb{S}^2\to S(\mathbb{S}^1\vee\mathbb{S}^1)\to \dots$$ is co-exact, where the first map is the attachment map of the CW-complex, and the last map is a suspension of the attachment map. Being co-exact means that the sequence of pointed homotopy classes $$\dots\to[S(\mathbb{S}^1\vee\mathbb{S}^1);X]\to[\mathbb{S}^2;X]\to[\mathbb{T}^2;X]\to[\mathbb{S}^1\vee\mathbb{S}^1;X]$$ is exact.
3) The suspension of the attachment map is nullhomotopic, so that we get the exact sequence $$\dots\to0\to\pi_2(X)\to[\mathbb{T}^2;X]\to[\mathbb{S}^1\vee\mathbb{S}^1;X]$$ where we replaced $[\mathbb{S}^2;X]\equiv\pi_2(X)$.
4) The wedge sum $\mathbb{S}^1\vee\mathbb{S}^1$ is a coproduct in the category of (homotopy) pointed top. spaces and so the functor $[-;X]$ respects it, and so we get the equality $[\mathbb{S}^1\vee\mathbb{S}^1;X]=[\mathbb{S}^1;X]\times[\mathbb{S}^1;X]\equiv\pi_1(X)^2$. But we assumed $\pi_1(X)=0$ so that finally we get the exact sequence $$\dots\to0\to\pi_2(X)\to[\mathbb{T}^2;X]\to0$$
5) Since $X$ is path-connected, we may replace $[-;X]$ (the set of pointed homotopy classes) with the set of homotopy classes.