Let $X_1, \dots, X_n$ be topological spaces.
For any $i \in \{1,\dots, n\}$ and any points $x_j \in X_j$, $j\ne i$, show $f: X_i \to X_1 \times \cdots \times X_n$ defined by $f(x)=(x_1, \dots, x_{i-1}, x, x_{i+1}, \dots, x_n)$ is a topological embedding of $X_i$ into the product space.
I need to show that $f$ is injective and continuous and homeomorphic to its image. But I am having trouble showing it is continuous.
Let $U_1\times \cdots \times U_n$ be a basis element of $X_1\times \cdots X_n$ and suppose $x \in f^{-1}(U_1\times \cdots \times U_n)$. Then $f(x)=(x_1, \dots, x_{i-1}, x, x_{i+1}, \dots, x_n) \in U_1\times \cdots \times U_n$.
How can I show this is continuous?
In general if $f:Y\to Z$ is a function and $Y$ and $Z$ are topological spaces then - if $\mathcal V$ denotes a subbase for the topology on $Z$ - it can be shown that: $$f\text{ is continuous }\iff f^{-1}(\mathcal V)\subseteq\tau_Y\tag1$$where $\tau_Y$ denotes the topology on $Y$. Here $\implies$ is evident.
For any collection $\mathcal W$ of subsets of some set we can agree that $\tau(\mathcal W)$ denotes the smallest topology that contains $\mathcal W$ as a subcollection. Using this notation it can be proved that:$$\tau(f^{-1}(\mathcal V))=f^{-1}(\tau(\mathcal V))\tag2$$
A direct consequence of the RHS of $(1)$ is that $\tau(f^{-1}(\mathcal V))\subseteq\tau_Y$, and applying $(2)$ on the RHS of $(1)$ we find that $$f^{-1}(\tau_Z)=f^{-1}(\tau(\mathcal V))=\tau(f^{-1}(\mathcal V))\subseteq\tau_Y$$
So this states that $f$ is continuous.
This can be used to prove that $f:X_i\to X_1\times\cdots\times X_n$ as described in your question is continuous.
For $\mathcal V$ we take the collection of sets that can be written as $p_j^{-1}(U)$ where $j\in\{1,\dots,n\}$, $p_j$ denotes the projection onto $X_j$ and $U$ is an open subset of $X_j$. This is a suitable subbase for the product topology.
If $j\neq i$ then $f^{-1}(p_j^{-1}(U))=(p_j\circ f)^{-1}(U)\in\{\varnothing, X_i\}\subseteq\tau_{X_i}$. It will take value $\varnothing$ if $x_j\notin U$ and will take value $X_i$ otherwise (note that $p_j\circ f$ is a constant function that takes value $x_j$).
If $j=i$ then $f^{-1}(p_j^{-1}(U))=f^{-1}(p_i^{-1}(U)=(p_i\circ f)^{-1}(U)=U\in\tau_{X_i}$ (note that $p_i\circ f=\mathsf{id}_{X_i}$).