Question on "up to isotopy" when attaching two spaces Let $M$, $N$, $A$, $B$ be topological spaces (or manifold) such that $A$ and $B$ are subspaces in $M$, $N$ respectively.
Let $f: A \to B$ and $g:A \to B$ be homeomorphism and assume that $f$ and $g$ are isotopic. We attach spaces $M$ and $N$ via $f$ and $g$ and obtain $M\cup_fN$ and $M\cup_gN$.
I want to prove (or disprove) that $M\cup_fN$ and $M\cup_gN$ are homeomorphic.
First of all, I am confused by the difinition of isotopy.
My understanding is that homeomorphisms $f: A \to B$ and $g:A \to B$ are isotopic if there is a map $H: A\times [0,1] \to B$ such that $H(x, t)$ is a homeomorphism for each $t\in [0,1]$ and $H(x, 0)=f(x)$ and $H(x,1)=g(x)$.
Is this definition correct in this context?
Any suggestions to the definition of isotpy and construction of a homeomorphism between $M\cup_fN$ and $M\cup_gN$ are appreciated.
 A: In the differential context (ie, all spaces are smooth manifolds), if $f,g\colon A\rightarrow N$ are smooth maps, an ambient isotopy between $f$ and $g$ is a (smooth) isotopy $F\colon N\times R\rightarrow N$ such that $F(p,0) = p$, for $p\in N$ and $F(f,1)= g$. If $f$ and $g$ are ambient isotopic, then $M\cup_f N$ and $M\cup_g N$ are diffeomorphic.
It is a theorem of Thom, Cerf and Palais that if $A$ is compact and $N$ is closed, then two embeddings are isotopic if and only if they are ambient isotopic (see Theorem 5.2 in chapter II in Kosinski's Differential manifolds).
EDIT: Regarding the topological version of this theorem: Suppose $A = S^1$ and $M = S^3$, and $f,g$ are the trivial knot and the trefoil knot. Then $f$ and $g$ are topologically isotopic, but their complements are not homeomorphic, so this topological isotopy does not extend to an ambient isotopy (In https://www.encyclopediaofmath.org/index.php/Isotopy_(in_topology) there is an account of topological isotopy, with conditions for a topological isotopy extension theorem to be true and references)
