I have been trying to prove the following simple-looking result which I require for some work in low-dimensional topology. I expect it is likely true and in a textbook somewhere so any reference or proof would be much appreciated, but it is possible my guess is off so any direction towards a counterexample would of course be useful as well.
From now we assume all CW-complexes to have a single $0$-cell.
Given a CW-pair $(Y,X)$, we form $X’$ by gluing some amount of new cells to $X$ (where these new cells are arbitrary and not cells of $Y$). We denote by $Y'$ the result of gluing in these same cells to $Y$ by gluing them into the subcomplex $X\subset Y$. We ensure in doing this that the new cells do not intersect $Y$ outside of this gluing into $X\subset Y$. The question is do we have that $Y/X$ is homeomorphic to $Y'/X'$?
Some notes so far: the cells of $Y/X$ can be identified with those of $Y-X$ and a $0$-cell, and likewise for $Y'/X'$, so in particular these quotient spaces have the same cells (in the sense that there is a natural identification between the cells of each space). Hence it suffices to check that the attaching maps are the same through this identification. I think I can prove the result for when $X$ and $Y$ are 2-complexes, but I am interested as to whether it is true in some higher dimensions as well.