1. Because of the regularity conditions on f (that is, it is a continuously differentiable function), you can use Clairaut's Theorem to equate the mixed partial derivatives.
2. Your g(y) and h(x) are not unique. Almost any ol' functions will do there! But this does not hurt your final result, since you're not asked to find unique functions.
Other than these comments, it looks fine to me.