How to prove that we can solve limits by substitution? I am currently learning analysis and my professor used substitution to solve a lot of limit problems, so I want to know under what circumstances can we use substitution and how to prove it.
Example: $\lim_{x\rightarrow 0}\frac{\sin x^2}{x^2}=\lim_{u\rightarrow 0}\frac{\sin u}{u}$ by substitute $u=x^2$
Here is my attempt.
My understanding of limit solving by substitution is that 
$\lim_{x\rightarrow a}u(x)=b\implies\lim_{x\rightarrow a}f(u(x))=\lim_{u\rightarrow b}f(u)$
Proof(probably wrong):
Suppose $\lim_{x\rightarrow a}u(x)=b$ and $\lim_{x\rightarrow a}f(u(x))=L$
then $\forall\epsilon\gt 0 \exists\delta_1$ s.t $0\lt|x-a|\lt\delta_1\implies|f(u(x))-L|\lt\epsilon$
then $\forall\delta_1\gt 0 \exists\delta_2$ s.t $0\lt|x-a|\lt\delta_2\implies|u(x)-b|\lt\delta_1$
then fix $\delta=\min(\delta_1,\delta_2)$
we have $\forall\epsilon\gt 0 \exists\delta$ s.t $0\lt|x-a|\lt\delta$ implies $|f(u(x))-L|\lt\epsilon$ and $|u(x)-b|\lt\delta_1$
Since $P\wedge Q\implies(P\implies Q)$
we have $\lim_{u\rightarrow b}f(u)=L$
and do the same thing for the reverse case then the statement is proved.
 A: This is not quite correct. In fact,
$$\lim_{x\rightarrow 0}\frac{\sin x^2}{x^2}=\lim_{u\rightarrow 0^+}\frac{\sin u}{u}$$
and the justifications is that the mapping $x\to u$ is surjective.
A: Your professor should describe to you the limit law for composition of functions in the same manner as the laws dealing with limits of sum, difference, product, quotient of functions are described. Such laws can be used to solve typical problems without providing an explicit proof everytime.
The law for limit of composite functions says:

Limit of composite functions: If $f(x) \to  b, f(x) \neq b$ as $x\to a$ and $g(x) \to L$ as $x\to b$ then $g(f(x)) \to L$ as $x\to a$. 

The rule is one way and can be made two way if $f$ is invertible in a neighborhood of $a$.
The example shown in your question should be understood in the following manner. It is well know that $f(x) =x^2\to 0$ as $x\to 0$ and $f(x) \neq 0$ as $x\to 0$. Further it is also known that $g(x) =(\sin x) /x\to 1$ as $x\to 0$. Hence by the law of limit of composite functions we have $g(f(x)) =(\sin x^2)/x^2\to 1$ as $x\to 0$.
However one does not write such a long explanation when using the law and instead the process is exactly as in your question: let $u=x^2$ so that $u\to 0$ as $x\to 0$ and then $$\lim_{x\to 0}\frac{\sin x^2}{x^2}=\lim_{u\to 0}\frac{\sin u} {u} =1$$ It is expected that an examiner or reader will understand the proper meaning and usage of the law as described above just by looking at those steps.

Your proof tries to prove the converse of the law which is not valid in general. The law is dealing with limit of the composite function as a conclusion not as a hypothesis.
The law as stated above in the answer can be proved using definition of limit. Thus start with an $\epsilon>0$ and then we have a $\delta'>0$ such that $|g(x) - L|<\epsilon$ whenever $0<|x-b|<\delta'$.
Since $f(x) \to b$ and $f(x) \neq 0$ we can find a $\delta>0$ such that $0<|f(x)-b|<\delta'$ whenever $0<|x-a|<\delta$. From these inequalities one gets $$|g(f(x)) - L|<\epsilon $$ whenever $0<|x-a|<\delta$ and the proof is complete. 
