Hi,
The way I see it is the following:
I think there is a confusion here between a function and its value.
Derivatives have to be defined wrt an input of your function (you can check the definitions you linked).
So when you write, df(x,y)/dg(x,y), the only way to make sense of this is to write b = g(x,y). And f(x, y, b). And your derivative is written as df(x,y,b)/db to clearly see the fact that we derive wrt an input.
Given this new formulation, the derivatives that you want to compute is then clearer: When computing this derivative, you ignore any dependency of b in x or y.
Does this makes sense?