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...
You should be looking at the fact that $S^{n-1} \to B^n$ is a cofibration.
EDIT: This is a response to your below comment. There is a certain diagram that tells you what a cofibration is, it is annoying and ugly at first, but eventually it will make some amount of sense. The idea this diagram is supposed convey is that $A \to X$ (think of $A$ as a subspace of $X$) is a cofibration if we have a function out of $X$, say $f:X \to Y$, then once we have a homotopy of $f$ restricted to $A$ then we get a homotopy of "all" of $f$. There are many ways to think about cofibrations though, not all of them are easy to understand. Morally, a cofibration is a map $i: A \to X$ s.t. $X/i(A)$ behaves well in the eyes of homotopy theory, that is the homotopy type of $X/i(A)$ depends only on the homotopy class of $i$.
A couple of important points about cofibrations is that every map is homotopic to a cofibration, think about the mapping cylinder. Also, if you have the inclusion of a subspace $A$ into $X$ where $X$ is obtained from $A$ by attaching cells then that inclusion is a cofibration, this is an easy way of noticing that map in question is a cofibration. Now since it is a cofibration and since you have a homotopy then the quotients should be the same. That last sentence can be made precise, think about what the pushout is actually the quotient of and how you can fit your attaching map into that picture.