Proof (union of affine algebraic sets)

Suppose $p\in Z(S)$. By definition for all $f\in S$, $f(p) = 0$. Therefore for all $f\in S$ and $g\in T$, $(f\cdot g)(p) = f(p) \cdot g(p) = 0$. Thus $p\in Z(S\cdot T)$. Similarly with $p\in Z(T)$.

Conversely if $p\in Z(S\cdot T)$ but $p\not\in Z(T)$, the latter says there exists $g\in T$ such that $g(p)\neq 0$. Therefore using the former, for all $f\in S$, $0 = (f\cdot g)(p) = f(p) \cdot g(p)$ so $f(p) = 0$. Thus $f(p) \in Z(S)$.