I have a function $f$ that can be expressed either as $f(x, t)$ or $f(g, t)$, where $g = g(x, t)$ and $x = x(t)$. What are the partial derivatives of each with respect to $t$? I was thinking it was this:
$$ \frac{\partial}{\partial t} f(x, t) = \frac{\partial f}{\partial t} $$
$$ \frac{\partial}{\partial t} f(g, t) = \frac{\partial f}{\partial t} + \frac{\partial f}{\partial g} \frac{\partial g}{\partial t} $$
But then some other equations I am working with suggest that
$$ \frac{\partial}{\partial t} f(x, t) - \frac{\partial}{\partial t} f(g, t) = \frac{\partial f}{\partial g} \frac{\partial g}{\partial t} $$
Whereas the previous equations obviously imply
$$ \frac{\partial}{\partial t} f(x, t) - \frac{\partial}{\partial t} f(g, t) = -\frac{\partial f}{\partial g} \frac{\partial g}{\partial t} $$
So I am doubting that I have the partial derivatives at the top correct.
First part: Here we start with the first part and consider \begin{align*} \frac{d}{dt}f(x,t)\qquad x=x(t)\tag{1} \end{align*} in some detail. It is convenient to use the somewhat more general setting \begin{align*} \frac{d}{dt}f(x,y)\qquad x&=x(t)\\ y&=y(t)\tag{2} \end{align*} to better see what's going on. The case (1) is a special case of (2) with $y(t)=t$.
With $y=y(t)=t$ the expression (3) boils down to \begin{align*} \color{blue}{\frac{d}{dt}f\left(x(t),t\right) =f_x\left(x(t),t\right)x^{\prime}(t)+f_y\left(x(t),t\right)} \end{align*}
Example: We calculate a small example in two different ways \begin{align*} f(x,y)=x^2y^3+\sin y\qquad x(t)&=2t^2+1\\ y(t)&=t \end{align*}
On the one hand we obtain according to (3) \begin{align*} \color{blue}{\frac{d}{dt}}&\color{blue}{f\left(x(t),y(t)\right)}\\ &=\frac{d}{dt}\left(x^2(t)y^3(t)+\sin\left(y(t)\right)\right)\\ &=2x(t)y^3(t)x^{\prime}(t)+\left(3x^2(t)y^2(t)+\cos(y(t))\right)y^{\prime}(t)\\ &=2\left(2t^2+1\right)t^3\left(4t\right)+3\left(2t^2+1\right)^2t^2+\cos(t)\\ &\,\,\color{blue}{=28t^6+20t^4+3t^2+\cos(t)}\tag{4} \end{align*}
On the other hand we get \begin{align*} \color{blue}{\frac{d}{dt}}&\color{blue}{f\left(x(t),y(t)\right)}\\ &=\frac{d}{dt}\left(\left(2t^2+1\right)^2t^3+\sin(t)\right)\\ &=\frac{d}{dt}\left(4t^7+4t^5+t^3+\sin (t)\right)\\ &\,\,\color{blue}{=28t^6+20t^4+3t^2+\cos(t)} \end{align*} in accordance with (4).
Second part: OP wants also to calculate \begin{align*} \frac{d}{dt}f(g,t)\qquad g=g\left(x(t),t\right) \end{align*} Again, it's more convenient to consider a slightly more general setting, namely \begin{align*} \frac{d}{dt}f(g,h)\qquad g&=g\left(x(t),y(t)\right)\\ h&=h(t) \end{align*}
Here I indicate the derivation using the compact notation only. The details follow the lines of the example above.