E.g. if the set is $S=\{(x,y), g(x,y) = 0\}$, $g$ is a continuous function. How to prove that S is closed?
It seems that the relationship between continuous function and convergent sequence and the Lemma that "A set A in a metric space is closed iff the limit of every convergent sequence in A belongs to A" can be used here. I am not sure how the relationship between continuous function and convergent sequence is applicable here.
Suppose $X$ is a general metric space, let $g:X\rightarrow\mathbb{R}$ be a real continuous function and let $A=g^{-1}(0)$. Choose a convergent sequence $(x_n)_{n\in\mathbb{N}}$ in $A$. Then by continuity $$ g\left(\lim_{n\rightarrow\infty}x_n\right) = \lim_{n\rightarrow\infty}g\left(x_n\right). $$ Can you finish?