Let $X\subset \mathbb{P}^n$ be a projective algebraic set.
That $X \subset Z(I(X))$ is clear. For the other inclusion, let's take $x\in Z(I(X))$ and we want to see that $x\in X$. Since $x\in Z(I(X))$, then $f(x)=0$ for all homogeneous $f\in I(X)$. My question is, how does that necessarily imply that $x\in X$? We know that for homogeneous $f\in I(X)$, $f(x)=0$ for all $x\in X$, but how do we know that there isn't a point $q\in \mathbb{P}^n \setminus X$ such that all homogeneous $f\in I(X)$ vanish at said point $q$?
In general, if $X\subset\mathbb{P}^n$ is any subset, then you only have the inclusion $X\subset Z(I(X))=\overline{X}$. However, in the question it is assumed that $X$ is an algebraic set so $X=Z(J)$ for some homogeneous ideal $J\subset I(X)$. Now if $p\in Z(I(X))-X$, then every polynomial in $I(X)$ vanishes on $p$ and hence $J$ also vanishes on $p$ contradicting the fact that $p\in Z(J)=X$.