With the following problem, would I do it by showing the the complement is open or by showing that it contains all it's limit points (or something else - if so, what)? I can't see in what way I would use either method.

Let (X,d) and (Y,e) be metric spaces, let f,g:X to Y be continuous. Prove that the set B = {x in X : f(x) = g(x)} is a closed subset of X.