Uniqueness of one-point compactification, problem with proof [duplicate]
One thing to keep in mind: To say that $X$ is embedded in $Y$ means that the given topology on $X$ is identical to the subspace topology on $X$ relative to $Y$ (what you are called the topology on $X$ that is "generated by $Y$", but I am trying to keep closer to Munkres' language of the subspace topology). Similarly $X$ is embedded in $Y'$, so again the given topology on $X$ is identical to the subspace topology on $X$ relative to $Y'$.
Using your example where the topology on $Y'$ is $\{\emptyset, X, Y'\}$, then it follows that the given topology on $X$ is $\{\emptyset,X\}$, and from that it follows that the topology on $Y'$ is $\{\emptyset,X,Y'\}$.