What is the theory behind differentiating functions with respect to variables other than the independent variables of that function? I am a high school calculus student. I understand how to differentiate functions both with respect to their independent variable and with respect to other variables, but I am in question about the theory behind this. 
Normally, when you differentiate a function with respect to its independent variable, for example $y=x^2$, you can use the exponent rule to obtain $\frac{\mathrm dy}{\mathrm dx} = 2x$. However, when differentiating $x^2$ with respect to time, we get $2x\frac{\mathrm dx}{\mathrm dt}$.
My teacher never really explained this, so I just tried to explain it myself. Please tell me if my thought process is accurate:
We started the year off with the limit definition of the derivative. Our teacher then showed us how there is a pattern with the limit definition of the derivative, which is where we came up with the exponent rule. 
Therefore, the exponent rule is based off the limit definition of the derivative. One of the parameters of using the limit definition of the derivative is one must know how the variable your differentiating with respect to relates to the function (i.e. it is the independent variable of the function.)
Therefore, one can only use the exponent rule when your differentiating with respect to the independent variable of the function, because this is required of the limit definition of the derivative, and the exponent rule is based off of the limit definition of the derivative. 
Is my reasoning sound? Is this why the derivative of $x^2$ w.r.t. time is $2x\frac{\mathrm dx}{\mathrm dt}$? Since we do not explicitly know how time relates to $x$, our function?
 A: Everything you write is sound.
When starting with calculus one only considers functions $x\mapsto y=f(x)$ with $x$ and $y$ real variables. In this realm the function $f(x):=x^2$ has derivative $f'(x)=2x$. Similarly  other "well known" function terms $f(x)$ have derivatives $f'(x)$ computable as function terms.
Now in your situation it is envisaged that $x$ is no longer an independent variable, but is in fact a function of some "extraneous" variable $t$ ("time"). In such a situation one does not introduce a new function symbol, but just writes $t\mapsto x(t)$, so that the letter '$x$' denotes this function as well. In the case at hand this function is not given explicitly as a function term in the new independent variable $t$, but we are told that a functional dependence $t\mapsto x(t)$ is established. One now is interested in the composed function
$$\phi(t):=f\bigl(x(t)\bigr)$$ of the variable $t$, where $f(x):=x^2$ had been given in advance. By the chain rule one has
$$\phi'(t)=f'\bigl(x(t)\bigr)\>x'(t)=2x(t)\>x'(t)\ .$$
Unless $t\mapsto x(t)$ is given explicitly the RHS cannot be expressed otherwise at the moment.
