I have a question on the marked part. (I will state the summary of the question at the end again.)
Question:
Let $f_n \to f$ in $L^2$ and $f_n' \to g$ in $L^2$. By considering a subsequence, we may assume that $f_n \to f$ and $f_n' \to g$ pointwise almost everywhere. Thus we may write $$f_n(x)=\int_0^x f_n'(t)dt$$ for almost every $x$. The book says that this implies $$ f(x)=\int_0^x g(t)dt$$ but how one can obtain this? It seems we need dominated convergence-like stuff, but what integrable function dominates $f_n'$?


$\int_0^{x}f_n'(t)dt \to \int_0^{x}g(t)dt$ for every $x$ because $|\int_0^{x}f_n'(t)dt-\int_0^{x}g(t)dt| \leq \sqrt x \sqrt {\int_0^{x}|f_n'(t)-g(t)|^{2}dt}$. Hence you get the result by taking limits on both sides.