We know there is a property about algebraic set:
$V(I\cap J) = V(I) \cup V(J)$
Where $I$ and $J$ are two ideals consisting polynomials contained in a polynomial ring (not shown). $V(I)$ is a algebraic set consisting of points which make polynomials in $I$ vanishing, i.e. $V(I) := \{x|f_i(x)=0, f_i\in I\}$.
Now, consider the following graph:

My question is
$V(I)$ should be the set of points making both 1 and 2 polynomials vanishing. So it should be points 1 and 2 (red pts). And $V(J)$ should be points 2 and 3 (red pts). The $V(I) \cup V(J)$ should be red points 1, 2 and 3.
However, I think $V(I\cap J)$ should be the green triangle, which is the intersected polynomial. My idea is $I\cap J$ = green triangle
I am confused where did I make a mistake?
So it looks to me like you are doing something wrong when you are finding $I \cap J$ because you are claiming that any polynomial in it should vanish on your green triangle. Using your notation the polynomial $1*3$ is in $I \cap J$ and doesn't vanish on the entire green triangle (instead it vanishes if either $1$ or $3$ does). This means that, since $2$ is in the intersection of these ideals as well, the most places that could be in the vanishing set of $I \cap J$ are the three red dots in your picture.