Let $f, g: S^{n-1} \to X$ be a pair of homotopic continuous maps. Let $X \cup_f B^n$ and $X \cup_g B^n$ be the respective adjunction spaces (pushouts of $B^n \hookleftarrow S^{n-1} \rightarrow X$). I need to show that $X \cup_f B^n$ and $X \cup_g B^n$ are homotopy-equivalent.
I can just about convince myself that it's true by imagining deformations of one into another by embedding in some ambient space, but I guess this isn't possible in general.
I also tried proving this by general abstract nonsense but got nowhere, and then I realised I hadn't used any special properties of $B^n$ at all. What properties should I be looking at? A friend mentioned that his solution used the fact that $B^n \setminus U$, where $U \subset S^{n-1}$ is open, is homotopy-equivalent to $B^n$ or something like that, but I haven't been able to make any sense of that remark.
Edit: After thinking a little more, by more general abstract nonsense, I think I've figured out how to get a sort of deformation map, and it seems to work for arbitrary spaces, so let $S$ be a subspace $B$, and let $h: S \times I \to X$ be a homotopy from $f: S \to X$ to $g: S \to X$. Let $H: S \times I \to X \times I$ be the map $(s, t) \mapsto (h(s, t), t)$. Let $(X \times I) \cup_H (B \times I)$ be the pushout of $B \times I \hookleftarrow S \times I \xrightarrow{H} X \times I$. Then, by the universal property of pushouts, we have a projection $p: (X \times I) \cup_H (B \times I) \to I$ that agrees with the obvious projections, and injections $X \cup_f B \to (X \times I) \cup_H (B \times I)$, and indeed it's even $p^{-1}(\{0\})$. Then, by the universal property of $(X \times I) \amalg (B \times I) \simeq (X \amalg B) \times I$, we have a map $(X \amalg B) \times I \to (X \times I) \cup_H (B \times I)$. So we have a homotopy from the quotient map $X \amalg B \to X \cup_f B$ to the quotient map $X \amalg B \to X \cup_g B$. But I'm not sure this is any help...