[guided]The target space $\mathbb A_k^{n-r}$ has coordinate ring $S=k[x_{r+1},\dots,x_n]$, so the correct vanishing ideal to compute is not an ideal of the full ring $R=k[x_1,\dots,x_n]$, but an ideal of $S$. For any subset $Y\subseteq \mathbb A_k^{n-r}$, define $\mathcal I_S(Y):=\{g\in S:g(y)=0 \text{ for every } y\in Y\}$. A polynomial function $g:\mathbb A_k^{n-r}\to k$ is continuous in the Zariski topology, and $\{0\}\subseteq \mathbb A_k^1$ is Zariski closed. Therefore the zero set of $g$ is closed. It follows that $g$ vanishes on $Y$ if and only if it vanishes on the closure $\overline Y$. Applying this with $Y=\pi(X)$ gives
\begin{align*}
\mathcal I_S(\overline{\pi(X)})=\mathcal I_S(\pi(X)).
\end{align*}
We next compute $\mathcal I_S(\pi(X))$. Let $g\in \mathcal I_S(\pi(X))$. The polynomial $g$ is an element of $S$, and the inclusion $S\subseteq R$ lets us also view $g$ as a polynomial in $x_1,\dots,x_n$ which does not involve $x_1,\dots,x_r$. If $a=(a_1,\dots,a_n)\in X$, then $\pi(a)=(a_{r+1},\dots,a_n)\in \pi(X)$, so the definition of $\mathcal I_S(\pi(X))$ gives
\begin{align*}
g(\pi(a))=0.
\end{align*}
Because $g$ depends only on $x_{r+1},\dots,x_n$, this is the same as
\begin{align*}
g(a)=0.
\end{align*}
Thus $g$ vanishes on $X=V(I)$ as an element of the full [polynomial ring](/page/Polynomial%20Ring) $R$.
Now we use the algebraically closed hypothesis. The affine radical ideal correspondence [citetheorem:9414] says that, over an algebraically closed field, the vanishing ideal of $V(I)$ is $\sqrt I$. Since $g$ vanishes on $V(I)$, we obtain $g\in\sqrt I$. We already had $g\in S$, hence
\begin{align*}
g\in \sqrt I\cap S.
\end{align*}
For the reverse inclusion, let $g\in \sqrt I\cap S$. Again by the affine radical ideal correspondence [citetheorem:9414], membership in $\sqrt I$ means that $g$ vanishes on $V(I)=X$. Therefore $g(a)=0$ for every $a\in X$. Since $g\in S$, evaluating $g$ on $a$ is the same as evaluating it on the projected point $\pi(a)$:
\begin{align*}
g(\pi(a))=g(a)=0.
\end{align*}
Thus $g$ vanishes on every point of $\pi(X)$, which means $g\in\mathcal I_S(\pi(X))$.
The two inclusions prove
\begin{align*}
\mathcal I_S(\pi(X))=\sqrt I\cap S.
\end{align*}[/guided]