[guided]We must check that the polynomial formula just constructed actually has values in $Y$, not merely in the ambient [affine space](/page/Affine%20Space) $\mathbb{A}^m_k$. The set $Y$ is cut out by its vanishing ideal $I(Y)$: a point belongs to $Y$ precisely when all polynomials in $I(Y)$ vanish at that point, using the affine Nullstellensatz over the algebraically closed field $k$.
Take an arbitrary relation
\begin{align*}
h \in I(Y).
\end{align*}
The residue class $\overline{h}$ of $h$ in the coordinate ring $k[Y]=k[y_1,\ldots,y_m]/I(Y)$ is zero. Applying the homomorphism $\alpha$ gives
\begin{align*}
\alpha(\overline{h})=0 \in k[X].
\end{align*}
Now use the fact that $\alpha$ is a $k$-algebra homomorphism. Since $h$ is obtained from the coordinate polynomials $y_1,\ldots,y_m$ by addition, multiplication, and scalar multiplication over $k$, applying $\alpha$ to the class of $h$ is the same as evaluating the same polynomial expression at the images of the coordinate classes:
\begin{align*}
\alpha(\overline{h})=h(\alpha(\overline{y}_1),\ldots,\alpha(\overline{y}_m)).
\end{align*}
By definition, $\alpha(\overline{y}_j)=f_j$, so
\begin{align*}
h(f_1,\ldots,f_m)=0 \in k[X].
\end{align*}
Each $f_j$ is represented by the polynomial $F_j \in k[x_1,\ldots,x_n]$. Therefore the equality $h(f_1,\ldots,f_m)=0$ in $k[X]$ says exactly that the polynomial $h(F_1,\ldots,F_m)$ lies in $I(X)$, meaning
\begin{align*}
h(F_1,\ldots,F_m)(x)=0
\end{align*}
for every $x \in X$. But $\phi(x)=(F_1(x),\ldots,F_m(x))$, so this is the same as
\begin{align*}
h(\phi(x))=0
\end{align*}
for every $x \in X$.
Since this holds for every $h \in I(Y)$, every defining relation of $Y$ vanishes at $\phi(x)$. Hence $\phi(x)\in V(I(Y))$. Finally, because $k$ is algebraically closed and $Y$ is an affine variety, the affine Nullstellensatz identifies $V(I(Y))$ with $Y$. Thus $\phi(x)\in Y$ for every $x\in X$, and the constructed map is genuinely a map $\phi:X\to Y$.[/guided]