I need to prove the following in the discrete case, and I am not sure where to start.

Let X and Y be independent random variables, and let f and g be transformations. Then f(X) is independent of g(Y).

This intuitively makes sense to me, but I am not sure how to prove it in a way that will cover all possible transformations.