In the section in my multivar book covering iterated partials, there is this example:
Example
Let $z = f(x, y) = e^xsinxy$ and write $x = g(s, t)$, $y = h(s, t)$ for certain functions $g$ and $h$. Let $k(s, t) = f(g(s, t), h(s, t)).$ Calculate $k_{st}$.
Solution
By the chain rule, $k_s = f_xg_s + f_yh_s = \ldots$ Differentiating in $t$ using the product rule gives $k_{st} = (f_x)_tg_s + f_xg(s)_t + (f_y)_th_s + f_y(h_s)_t.$ Applying the chain rule again to $(f_x)_t$ and $(f_y)_t$ gives $(f_x)_t = f_{xx}g_t + f_{xy}h_t \quad \text{and} \quad (f_y)_t = f_{yx}g_t + f_{yy}h_t$ ... (rest of solution omitted)
This is the first time the chain rule is used in this way, and no explanation is given. I don't understand how the chain rule is used in the last step. Where do $g_t$ and $h_t$ come into the picture, since $g$ and $h$ are not related to $f$, they are only related to $k$ (which is just $f$ such that $x = g(s,t)$ and $y = h(s,t)$)? Can someone point me in the right direction?