I think the question wants you to show that X and Z are independent, for which you need to show that f(x) x f(z) = f(x,z), and that Y and Z are independent, for which you need to show that f(y) x f(z) = f(y,z).