Let $X_i$ be an algebraic set of an affine space $\mathbb{A}^2$ with Zariski topology with $k=\mathbb{C}$. I want to show that $I(X_1\cap X_2)\neq I(X_1)+I(X_2)$ for certain choice of $X_1$ and $X_2$ where $I(X)$ is the ideal of $k[x,y]$ which conists of function that vanish on $X$.
I have this example in mind $X_1=\{(x,y)|x=1\}$ and $X_2=\{(x,y)|x=2\}$. Then we can see that $X_1\cap X_2=\emptyset$, so $I(X_1\cap X_2)=I(\emptyset)=k[x,y]$. From other side, $$I(X_1)=(x-1)\text{ and }I(X_2)=(x-2)$$ $\Rightarrow$ $I(X_1)+I(X_2)=(x-1)+(x-2)$. Now, I want to show that $k[x,y]\neq(x-1)+(x-2)$. If they are equal, then $y\in (x-1)+(x-2)$, but $y$ does not vanish on $x=1$ and $x=2$ as a polynomial.
How should I interpret this geometrically?
Your example won't work because in fact $(x-1) + (x-2) = k[x,y]$. To see this, note that $1 = x-1 - (x-2) \in (x-1) + (x-2)$.
The real reason this equality doesn't hold is that $I(X)$ is always a radical ideal. So it suffices to choose $X_1$ and $X_2$ such that $I(X_1) + I(X_2)$ is not radical. This would mean that $\frac{k[x,y]}{I(X_1) + I(X_2)}$ contains nilpotents, which makes me think of tangent vectors. So let's try two curves that are tangent at a point, say $X_1: y = 0$ and $X_2: y = x^2$. Can you show that $I(X_1) + I(X_2)$ is not radical?