Homotopy of maps $(D^n, S^{n-1}) \longrightarrow (X,A)$ relative $S^{n-1}$ Suppose that for a map $f: (D^n, S^{n-1}) \to (X,A)$ (where $(X,A)$ is an arbitrary pair of spaces) there exists a homotopy $H: D^n \times I \to X$ with $H(\_,0)=f$, $H(s,t) \in A$ for $s \in S^{n-1}$ and $t \in I$ and $H(\_,1)=g$ where $g: D^n \to A$.
Why can we always choose this homotopy relative to $S^{n-1}$?
I was able to show that $f \simeq h$, where $h : D^n \to A$ and $f|_{S^{n-1}} = h|_{S^{n-1}}$, but not with a homotopy relative to $S^{n-1}$.
 A: I will show you that whevener you have chosen a homotopy $H$, you can construct a new  homotopy which is constant on $S^{n-1}$.
First, we label points on $D^n$ as $(r,\theta)$, treating $r$ as a continuous function $D^n\rightarrow I$. If $s\in I$ and $x=(r,\theta)\in D^n$, we interpret the product $sx$ as $(sr,\theta)$. We also define the retraction $p:D^n\setminus 0\rightarrow S^{n-1}$ as sending $(r,\theta)$ to $(1,\theta)$.
Now define the homotopy $H_1:D^n\times I \rightarrow X$ as
$H_1(x,t) = H(\frac{2}{2-t}x,t)$ if $r\leq 1-t/2$
and
$H_1(x,t) = H(p(x),2-2r)$ if $r\geq 1-t/2$
Notice that these agree when $r=1-t/2$, so we can glue them together. Notice that $H_1(x,0)=f$, $H_1(x,1)\in A$ for all $x\in D^n$ and $H_1$ is constant on $S^{n-1}$.
There exists a homotopy between $H$ and $H_1$ relative to $D^n\times\{0\}$, i.e. fixing $f$, but I am unable to write it down now.
A: The question asked should be seen as a special case of the following result, which is 7.4.4 of Topology and Groupoids. 
7.4.4 Let $ \mathbf f: (X,A) \to (Y,B)$ be a map of pairs  such that $\mathbf f$ is deformable in to $B$. Assume that the inclusion of $A$ in $X$ is a cofibration. Then $\mathbf f$ is deformable into $B$ rel $A$. 
One way of proving this is given as Exercise 5 in that section as follows: Let $R_t: X \times I \to X \times I$ be a retracting homotopy of $X \times I$ onto $W= X \times 1  \cup A \times I$ such that $$R_0= id, \; R_1(X \times I) \subseteq W$$ and $R_t$ is a homotopy rel $W$. Let $F_t:(X,A) \to (Y,B)$ be a homotopy deforming $F_0 = \mathbf f$ into $B$. Prove that the homotopy $(x,t) \mapsto  FR_t(x,0)$ deforms $F_0$ into $B$ rel $A$. 
