My teacher assigned some work from the textbook and I'm not really understanding it. He told us to think of composite functions as a "machine," where there are inputs and outputs of each function.

The question I'm having trouble with is:

If f(x) = 1/(1-x) and g(x) = 1-x, determine:

a. g(f(x)) and b. f(g(x)).

Are there any specific methods to doing these problems? The exemplars aren't really helping very much. :|

Much thanks in advance!