partial derivative chain rule $$
f(x,g(x),t) \\ \\
\frac{\partial f}{\partial x}=\frac{\partial f}{\partial x}\frac{\partial x}{\partial x}+\frac{\partial f}{\partial g}\frac{\partial g}{\partial x} \\ \\
=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial g}\frac{\partial g}{\partial x} \\ \\
\Rightarrow \frac{\partial f}{\partial g}\frac{\partial g}{\partial x}=0
$$
What's wrong with it? 
 A: The issues is one of notational pitfall. We can circumvent this through a more generous use of letters.  To that end, we let $f(x,y,t)$ be a given function of three variables.  Then, for $y=g(x)$, we can write $u(x,t)=f(x,g(x),t)$ and use the chain rule to show
$$\begin{align}
\frac{\partial u}{\partial x}&=\frac{\partial f}{\partial x}\frac{\partial x}{\partial x}+\frac{\partial f}{\partial y}\frac{\partial y}{\partial x}+\frac{\partial f}{\partial z}\frac{\partial z}{\partial x}\\\\
&=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}\frac{dg}{dx}
\end{align}$$
That is, 
$$\bbox[5px,border:2px solid #C0A000]{\frac{\partial u}{\partial x}=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}\frac{dg}{dx}}$$
We can alternatively use a numerical subscript notation to resolve notational problems.  Here, we write the partial derivatives of a function $f(x,y,z)$ as 
$$\begin{align}
\frac{\partial f}{\partial x}=f_1(x,y,z)\\\\
\frac{\partial f}{\partial y}=f_2(x,y,z)\\\\
\frac{\partial f}{\partial z}=f_3(x,y,z)
\end{align}$$
Then, we have for $u=f(x,g(x),t)$
$$\bbox[5px,border:2px solid #C0A000]{\frac{\partial u}{\partial x}=f_1(x,g(x),t)+f_2(x,g(x),t)\frac{dg}{dx}}$$
