I'm working on a problem that has to do with the Stone-Weierstrass theorem. This is the problem:

The way that I've been trying to do it is to produce an algebra of continuous functions that separates points and contains constant functions. If I define [itex]A[/itex] to be the set of all \sum_{i=1}^n g_ih_i where [itex]g_1,\ldots,g_n[/itex] are continuous on [itex]X[/itex] and [tex]h_1,\ldots,h_n[/tex] are continuous on [itex]Y[/itex], it is easy to show that constant multiples of functions in [itex]A[/itex] are in [itex]A[/itex], [itex]A[/itex] is closed under multiplication, [itex]A[/itex] separates points, and [itex]A[/itex] contains the constant functions. What I am having trouble showing is that [itex]A[/itex] is closed under addition (ie. that [itex]A[/itex] actually is an algebra). Is this true? If it is not then does anybody know of a way to come up with an algebra for this problem so that I could apply Stone-Weierstrass? Any help would be greatly appreciated.