I want to show that if $f\colon X \rightarrow Y$ is a topological embedding, then there is a topological space $Y'$ containing $X$ as a subspace and a homeomorphism $h$ from $Y$ to $Y'$ such that $h \circ f = j$, where $j\colon X \rightarrow Y'$ is the inclusion map.
Evidently I start by taking $Y' = X \sqcup (Y \setminus f(X))$, the disjoint union, as a set. The definition of $h\colon Y \rightarrow Y'$ will be the obvious one, namely, $h(y) = f^{-1}(y)$ if $y \in f(X)$, and $h(y) = y$ if $y \in Y \setminus f(X)$. Certainly $h$ is a bijection satisfying $h \circ f = j$.
My question: How exactly should one define the topology on $Y'$? (I do not think it is the usual topology on the disjoint union of two topological spaces.)
Of course, a subset $W$ of $Y'$ will have to be open in $Y'$ if and only if $h^{-1}(W)$ is open in $Y$. So the question is how to formulate that condition in terms allowing one to verify that the inclusion map $j\colon X \rightarrow Y'$ is an embedding for the topology given to $Y'$.
(This question is of no depth whatsoever, just a matter of some fussy details!)
Note of interest: I asked the question of three different LLM chat engines and got answers that may or may not be correct but are somewhat different from one another!