Hi,
A is computed as 2 * x. So A only depends on x, not y.
In particular, you might want to change your notation to avoid mixing symbolic variables and values.
If we write
f: x -> y. Then we can evaluate it at a given value x0 to get y0 = f(x0).
But then A = (df/dx)(x0) (the derivative of f evaluated at the point x0).
y0 is not actually an input of g here (it is just an intermediary result), so writing g(y) (or g(y0)) does not really make sense. It is actually g(x0).