Sum of derivative of integrals: $f(x)=\left(\int\limits_0 ^{x} e^{-t^2}dt\right)^2$ and $g(x)=\int\limits_{0}^{1}\frac{e^{-x^2(t^2+1)}}{t^2+1}dt$
Solution 1:
There was a minor error, almost but not quite a typo. When you substituted, "changing" $xt$ to $t$, there were two slips.
I think the slips could have been avoided if you had made the substitution in slightly different language, letting $u=xt$. Then $du=(x)dt$, which absorbs the extra $x$ in the integral. And your $e^{t^2}$ should be, in my notation, $e^{-u^2}$ (this really was a typo).
With these minor corrections, things work out fine.
There must be a more conceptual way of doing it, though the computational approach you took is reasonable, and works quickly enough.