I believe that "equality of functions" just refers to what is being said in the theorem - that two functions are equal iff f(a) = g(a).

That sentence makes no sense. A theorem is something you prove. If you are to prove this theorem, then it must be that you have a different definition of function equality that you're trying to show is equivalent to the one in the theorem. Otherwise, you have a definition here, not a theorem; you don't prove definitions.

I'm used to thinking of the equality of functions this way: two functions are equal if and only if their domains are the same, and their rules of association are the same. And this is precisely what your theorem is saying. Therefore, in order to help you out, I need to know how exactly you are defining function equality.

It might also be appropriate if you tell us exactly how you defined "function" in our class. that just might be all we need. but yes, if you have any alternative definition of equality of functions, you should state that as well. It shouldn't be difficult once we know what definitions we can use.

Definition: let A and B be nonempty sets. A function f from set A to set B (denoted by f: A -> B) is a relation between A and B satisfying the following conditions:
1. For each a that is an element of A, there exists b that is an element of B such that (a,b) is an element of f, and
2. if (a,b) and (a,c) are in f, then b=c.
If a is an element of A, the unique element b that is an element of B for which (a,b) is an element of f is denoted by f(a)

write down what the ordered pairs of f look like. what about the ordered pairs of g? compare them. If they are the same, you're done.

of course, the "if and only if" means you'd have to prove both ways, so you might want to be careful on how you set it up. there are ways to avoid the whole having to do it both ways thing, since you're dealing with equality here, but in general, you want to be good and show both directions.