This issue comes from a solution approach of a differential equation, but I encountered several times, not sure how to deal with it. The concrete problem (related to the wave equation) is:
Let $u: \mathbb{R} \times \mathbb{R}_+ \to \mathbb{R}$, $ (x,t) \mapsto u(x,t)$ be the function we look for and define for $X = \alpha x + \beta t$ and $T = \gamma x + \mu t$ the function $U$ via the condition $U(X,T) = u(x,t)$.
Now the instruction is to write the derivatives $\partial^2_{tt} u$ and $\partial^2_{xx} u$ as functions of $U$. Since they are equal I thought of something like this
$$ \partial^2_{tt} u = \partial^2_{tt} U(\alpha x + \beta t, \gamma x + \mu t) $$
My problem is now that $t$ occurs in both arguments of $U$. In general, how do I differentiate a function of a composition in several variables, i.e. how to determine something like
$$ \frac{\partial}{\partial t}f(g(x,t), h(x,t)) $$
By intuition, $$\frac{\partial}{\partial t}f(g(x, t), h(x, t)) = f_{y_1}(g(x, t), h(x, t))g_{t}(x, t) + f_{y_2}(g(x, t), h(x, t))h_{t}(x, t).$$ More systematically, we can argue using the chain rule to obtain $$\frac{\partial}{\partial t}f(g(x, t), h(x, t)) = Df(g(x, t), h(x, t))D_t( \begin{bmatrix} g(x, t) \\ h(x, t) \\ \end{bmatrix}) = Df(g(x, t), h(x, t)) \begin{bmatrix} g_t(x, t) \\ h_t(x, t) \\ \end{bmatrix}. $$