How does fundamental theorem of calculus and chain rule work? I came across a problem of fundamental theorem of calculus while studying Integral calculus.

A problem:
$\frac{d}{dx}\int_{\pi}^{x^2}\cot^2t\ dt$
which was salved as :
Step I : Let, F(x) = $\int_{\pi}^{x^{ }}\cot^2t\ dt$
⇒ $F'(x)= \frac{d}{dx}\int_{\pi}^{x^{ }}\cot^2t\ dt=cot^2(x)$
Step II : $\frac{d}{dx}\int_{\pi}^{x^2}\cot^2t\ dt$ = $\frac{d}{dx}[F(x^2)]$ = $F'(x^2)*\frac{d}{dx}(x^2)$
Step III : $F'(x^2)*\frac{d}{dx}(x^2) = cot^2(x^2)*2x$

I don't understand how can they salve 
$F'(x^2)$ in third step by putting $x^2$ directly into $F'(x)=cot^2x$
Reference : problem video

I think you're confusing $F'(x^2)$ and $(F(x^2))'$. The first is the function $F'$ $\bf{evaluated}$ at $x^2$ and the second is the derivative of the function $x \mapsto F(x^2).$ These are two different things ! 
If you take the function $x \mapsto F(x) = 2x + 1$. Then $F'(x) = 2$ so $F'(x^2) = 2$ but $$(F(x^2))' = (x^2)' \cdot F'(x^2) = 2x \cdot 2 = 4x.$$
Similarly for any differentiable function $h$, $h'(2)$ is not necessarily equal to $0$ since $$h'(2) \neq (h(2))' = 0.$$
