$X=\prod_{j\in J} X_j$, $X_k$ is homeomorphic to a subspace of $X$ 
Let $(X_j)_{j\in J}$ a nonempty family ($J\neq\emptyset$) of nonempty topological spaces ($X_j\neq\emptyset$ for every $j\in J$). Then is every $X_k$ homeomorphic to a subspace of $X=\prod_{j\in J} X_j$ in the product topology.

I struggle to understand every details in the following proof. I numerate the details I am going to ask about. The main focus is on (4) and (5):
Let $k\in J$. For every $j\in J$ choose $p_j\in X_j$. (1)
Set $f_j: X_k\to X_j$, $f_j(q)=\begin{cases}{q\,\text{if $j=k$}\\ p_j\,\text{if $j\neq k$}}\end{cases}$
$f_j$ is continuos for every $j\in J$. (2)
Then $f: X_k\to X, f(q)=(q_j)_{j\in J}=\begin{cases} q\,\text{if $j=k$}\\ p_j\,\text{if $j\neq k$}\end{cases}$ is continuous. (3)
Since $\operatorname{pr}_k\circ f =\operatorname{id}_{X_k}$ we have that $f$ is injective.
Set $Z=f(X_k)$ then the corestriction $f^{|Z}: X_k\to Z$ is bijective.
Now ${\operatorname{pr}_{k}}_{|Z}:Z\to X_k$ is bijective and continuous. (4)
This implies the corestriction $f^{|Z}$ is a homeomorphism. (5)
Most of the questions I ask just to make sure, I am correct, while I struggle at some:
at (1): 
This is an application of the axiom of choice.
at (2):
I want to verify that $f_j$ is indeed continuous: Let $U\subseteq X_j$ be open. I show that $f_j^{-1}(U)=\{q\in X_k| f_j(q)\in U\}\subseteq X_k$ is open for every $j\in J$.
If $j=k$, then $f_k^{-1}(U)=U\subseteq X_k$ open.
If $j\neq k$, then $f_j^{-1}(U)=X_j$ open.
at (3): 
Holdy by the universal property of the product topology: Universal property of product topology, unique up to homeomorphism
at (4):
I do not know why, but somehow this projection gives me a headache even though the concept is really easy, so I do not understand my problem...
If I want to prove by hand that $\operatorname{pr}_{k|Z}$ is continuous, I take $U\subseteq X_k$ open.
Then $\operatorname{pr}_{k|Z}^{-1}(U)=\{(q_j)_{j\in J}\in f(X_k)| \operatorname{pr}_{k|Z}((q_j)_{j\in J}\in U\}=\underbrace{U\times \prod_{k\neq j} X_j}_{\text{open in $X$}}\cap f(X_k)$ which is open in $f(X_k)$.
Injective:
Let $q,r\in f(X_k)$ then:
$\operatorname{pr}_{k|Z}(q)=\operatorname{pr}_{k|Z}(r)\Leftrightarrow q=r$
by definition of $f(q)$ for $j=k$.
Surjective:
Let $q\in X_k$. Then is $f(q)\in f(X_k)$ a preimage.
at (5):
We know that $f^{|Z}$ is continuous and bijective. So we need that $(f^{|Z})^{-1}$ is continuous.
How is this implied here?
Thanks in advance.
 A: (1) Is indeed an application of AC, though typically in topology we will only be dealing with finite or countable collections, so we often do not need something as strong as AC.
(2) Your proof that $f_j$ is continuous has a small mistake in it. Namely, $f^{-1}_j(U) = X_k$ iff $p_j \in U$. Otherwise, $f_j^{-1}(U) = \varnothing$. A more succinct version of this calculation would go: "this map is either the identity map, or it is a constant map, both of which are continuous, so this must be continuous".
(3) Yes, this is the universal property, though you haven't actually written down $f(p)$ properly. What it should be is $f(q)$ = $(f_j(q))_{j \in J}$. That is, $f$ acts on each coordinate as we have described.
(4) You are way overthinking this. Projection functions are continuous (by the universal property (consider what happens when $f = \text{Id}_X$).
(5) The projection you have described in step (4) is the inverse of $f$. Since $f$ is continuous and bijective, and its inverse is continuous, it is a homeomorphism.
A: For (5), is $f^{\restriction_{f(X_k)}}:X_k \longrightarrow f(X_k)$ not an open map with respect to the subspace topology on $f(X_k)$?
$f^{\restriction_{f(X_k)}}(U)=U \times \prod_{j\in J \setminus \{k\} }\{p_j\}=U \times \prod_{j\in J \setminus \{k\} } X_j \bigcap f(X_k)$
To be clear, I am alluding to the fact that if a bijection is an open map, then its inverse is continuous...
