Let $(X,\mathcal{A}, \mu)$ be a finite measure space and let $\{f_n\}$ be a sequence of real-valued measurable functions on $X$. Suppose that there is a constant $M$ such that $|f_n(x)| \leq M$ for all $n$ and $x \in X$. Suppose also that the sequence $f_n(x)$ converges almost everywhere to a function $f$. Show that $f$ is measurable and for each function $g \in L^2(X, \mu)$. $$\int fgd\mu=\lim_{n\to \infty}\int f_ngd\mu$$
can I have sth like a sketch of what should I do on rest of this problem?
Is the following enough to show that f is measurable? $$\forall \alpha \in \mathbb{R} , \lbrace x\in X:f(x)>\alpha \rbrace = \bigcup_{k\ge 1}\bigcup_{N\ge 1}\bigcap_{n\ge N}\bigg\lbrace x\in X: f_n(x)\ge \alpha + \frac{1}{k} \bigg\rbrace$$