Nullhomotopic map extended I have troubles understanding this proof:
Let $h:S^1 \rightarrow X$ be a continuous map, then we have that if $h$ is nullhomotopic, $h$ can be extended to a continuous map $k:B^2 \rightarrow X.$
Proof: Since $h$ is nullhomotopic, there exists a homotopy $H: S^1 \times I  \rightarrow X$ between $h$ and a constant map.(This is clear). 
Now we define a map $\pi:S^1 \times I \rightarrow B^2$ by $\pi(x,t)= (1-t)x$.
Then $\pi$ is continuous, onto and closed. Now, I am not sure why we know that this map is closed.  Alright so far. Now we notice that this is a quotient map with $\pi(S^1 ,1)=0 \in B^2$ and otherwise this map is injective. It is concluded from this that we can extend $h$ to a map $k$, but it is not sad: HOW?! Does anybody know why this is possible now?
 A: Define $k:B^2\to X$ by
$$k(x)=\begin{cases} H(\pi^{-1}(x))&\text{if }x\neq 0,\\
H(S^1,1) &\text{if }x=0.
\end{cases}$$
Note that we identify $S^1\cong \pi(S^1\times 0)=\partial B^2$. On this copy of $S^1$, $\pi(x,0)=x$. So 
$$k(x)=H(x,0)=h(x).$$
Thus $h$ extends to the map $k:B^2\to X$.
Note: It will be helpful to sketch a picture of $\pi$.
A: I'll use two lemmas:
Lemma 1: (Theorem 22.2 in Munkres) Let $p : X \to Y$ be a quotient map. Let $Z$ be a space and let $g : X \to Z$ be a map that is constant on each set $p^{-1}(\{y\})$, for $y \in Y$. Then $g$ induces a map $f : Y \to Z$ such that $f \circ p = g$. The induced map $f$ is continuous if and only if $g$ is continuous; $f$ is a quotient map if and only if $g$ is a quotient map.
Lemma 2: (Variation of Theorem 26.6 in Munkres) Let $f : X \to Y$ be a surjective continuous function. If $X$ is compact and $Y$ is Hausdorff, then $f$ is a closed map.
Theorem: Let $h : S^1 \to X$ be a continuous map. If $h$ is nullhomotopic, then $h$ extends to a continuous map $k : B^2 \to X$.
Proof: Since $h$ is nullhomotopic, there exists a homotopy $H : S^1 \times I \to X$ (which is continuous) between $h$ and $e_{c_0}$ for some $c_0 \in X$ such that $$\begin{align*} H(s, 0) &= h(s) \\ H(s, 1) &= e_{c_0}(s) = c_0\end{align*}.$$ Define $\pi : S^1 \times I \to B^2$ by $\pi(s, t) = (1 - t)s$. Notice:


*

*$\pi$ is continuous since the product of two continuous functions is continuous.

*$\pi$ is surjective since we are essentially shrinking the circle $S^1$ continuously towards the center $\textbf 0 \in \mathbb R^2$ and the mapping will hit every element in between $S^1$ and $0$, i.e., every point in $B^2$.

*$\pi$ is closed since $S^1 \times I$ is compact and $B^2$ is Hausdorff and we use Lemma 2.


Conclude that $\pi$ is a quotient map.
Notice that $H$ is constant on $\pi^{-1}(\{y\})$ for $y \in Y$.


*

*If $y \neq \textbf 0$, then $\pi^{-1}(\{y\})$ consists of a single element, so the property holds trivially.

*If $y = \textbf 0$, then $\pi^{-1}(\{y\}) = S^1 \times \{1\}$, but $H(s, 1) = e_{c_0}(s) = c_0$ and is therefore constant.


By Lemma 1, $H$ induces $k : B^2 \to X$ (continuous since $H$ is continuous, again by Lemma 1) such that $H = k \circ \pi$ and in particular $$\begin{align*} H(s, 0) &= k(s) = h(s) \\h(s, 1) &= k(0) = c_0\end{align*}.$$
A: The map $\pi:S^1\times I\to B^2$ is closed simply because the domain is compact and the codomain is Hausdorff.
Your homotopy $H$ respects the identifications imposed by $\pi$, namely $H(s,t)=H(s',t')$ whenever $\pi(s,t)=\pi(s',t')$, precisely because $H(s,1)=H(s',1)$ is the image under the constant map $H_1$ for all $s,s'\in S^1$. Then it follows by the universal property of quotient maps that $H$ induces a unique map $k:B^2\to X$ such that $k\pi=H$. We have $$k|_{S^1}=k\pi i=Hi=H_0=h$$ where $i:S^1\hookrightarrow S^1\times I$ is the inclusion of the circle as $S^1\times\{0\}$.
