I know that:
$$\frac{d}{dx}\int_{a}^{g(x)} f(t)dt = f(g(x))*g'(x)$$
But what about:
$$\int_{a}^{g(x)}\frac{d}{dx}f(x)dx$$
An example of this would be:
$$\int_{3}^{t^3}\frac{d}{dx}\frac{x}{x-2}dx$$
Do we apply the chain rule with the $t^3$?
On
This approach avoids explicit integration.
Notice that the $Antiderivative (derivative (f(x))=f(x))$
$$f\left(x\right)\:=\int \:\frac{d}{dx}\left(f\left(x\right)\right)dx$$
Using notations and concepts of Fundamental Theorem of Calculus
$$f\left(b\right)\:-f\left(a\right)=\int _a^b\:\:\frac{d}{dx}\:\left(f\left(x\right)\right)dx$$
Your case, use $f(x)=\frac{x}{x-2}$
$$I\:=\:f\left(t^2\right)\:-f\left(3\right)=\int _3^{t^2}\:\:\:\frac{d}{dx}\:\left(\frac{x}{x-2}\right)dx$$
$$I=\left(\frac{t^2}{t^2\:-2}\right) - 1=\frac{2}{t^2-2}$$
Note by the fundamental theorem of calculus,
$$\int_3^{t^2} {d \over dx} {x \over x-2}dx={t^2 \over t^2-2}-{3 \over 3-2}.$$
If instead the derivative was taken with respect to $t$ outside the integral, the Leibniz integral rule gives
$${d \over dt }\int_3^{t^2} {x \over x-2}dx={t^2 \over t^2-2}(2t).$$
The solution you provided is an unholy crossbreed between the above two results and is erroneous.