[SOLVED] Evaluation of a partial derivative using the chain rule

I was solving a practice test for the GRE math subject test and I came across a problem which I thought was unsolvable. The solution provided in the back makes no sense to me, so I hope someone can shed some light on this situation.

Let *f*, *g*, and *h* be functions of two variables that are differentiable everywhere such that where *x* and *y* in turn are functions of u and v. We know that

, and that and that . Let and . We are also given that

The object is to find .

Now note that the partial derivatives given are evaluated at different points, but the solution is not afraid to say that

Now, it makes no sense to me that you can just pick and choose where you evaluate the partials involved in the chain rule... but that's what the solution does. Shouldn't they all be evaluated at *P*? Why is it allowed to evaluate some at *Q* and some at *P*? Does the solution somehow implicitly make use of and which are given?

Thank you for taking the time to read my question!