Derivative of $h(x,t)=g\left(\frac{x}{t^2}\right)$ Can someone please explain me the method to get the partial derivative of a function like:

$h(x,t)=g\left(\frac{x}{t^2}\right)$ where $g$ is a differentiable function from $\mathbb{R}\to\mathbb{R}$.

I know that if we have a function $f(x(t,s),y(t,s))$ then
$\frac{\partial f}{\partial t}=\frac{\partial f}{\partial x}\cdot \frac{\partial x}{\partial t}+\frac{\partial f}{\partial y}\cdot\frac{\partial y}{\partial t}$.
Also I can see that the given function $h$ can be written as a composition of two functions as follows:
For $g_1(x.t)=\frac{x}{t^2}$. So that, $$h(x,t)=g(g_1(x,t)).$$
But I really cannot see how to use them to partially differentiate $h$.
Appreciate your help.
 A: $$\frac{\partial h}{\partial x}=g'(g_1(x,t))\cdot \frac{\partial g_1}{\partial x}(x,t)=g'\left(\frac{x}{t^2}\right)\cdot \frac{1}{t^2}$$
and
$$\frac{\partial h}{\partial t}=g'(g_1(x,t))\cdot \frac{\partial g_1}{\partial t}(x,t)=g'\left(\frac{x}{t^2}\right)\cdot \frac{(-2x)}{t^3}$$
Edit: Note that when you wrote the formula for partial derivative of $f,$ you had $2$ dependent functions $x$ and $y,$ whereas your function is actually simpler in that you only have one dependent function $g_1.$ Drawing a tree diagram (for example, explained here) always helped me during undergrad while applying chain rule when dealing with partial derivatives.
A: If i understood the situation well ,this may help :
Define $y= g_1(x,t) = x / t^2$.
Such that $h(x,t)=g(y)=g(g_1(x,t))$.
Then $\frac{\partial g_1 }{\partial t}= \frac{\partial y }{\partial t}=\frac{-2\times t \times x }{t^4 }$,
with $\frac{\partial y}{\partial t}=\frac{\partial g_1}{\partial t}=-2 \: \frac{x}{t^3}$ where $x \neq x(t)$.
We assume here that x is independant of t .
Then :
$$ \frac{\partial h(x,t) }{\partial t}= \frac{\partial g }{\partial y} \times \frac{\partial g_1 }{ \partial t } $$
And :
$$  g^{'}(y) = \frac{\partial g }{\partial y}  $$
A: I think the op has improved his post , thus i could suggest this trivial solution :
$ h(x,t)=g(y)=g(x/t^2) $
$ \frac{\partial h(x,t) }{\partial t} = g^{'}(y(t)) \times y^{'}(t) $
$ y^{'}(t)= -2x/t^3 $
g is a function of y , and y is a function of t so it will be simple to continue the other steps ! the derivative of y is already given in the previous answer !
