I have a question regarding to the following two steps of the proof.
How can we get $\int g_n \leq \int f_n$, or $g_n \leq f_n$ for all n, Since by definition of liminf, $g_n \leq f_m $ for all $m \geq n$. Where did the $m$ go?
Why did $\int f_n$ become $\liminf\int f_n$ suddenly?

For your first question, since $g_n \leq f_m$ for all $m \geq n$, then, if $m = n\implies m=n \geq n$, so $g_n \leq f_n$.
The second question, what happened was that he passed the liminf in the inequality: $$\int g_nd\mu \leq \int f_n d\mu \implies lim\inf_n \int g_nd\mu \leq lim\inf_n\int f_n d\mu $$ Now, since $g_n$ is increasing, then $$lim\inf_n \int g_nd\mu =lim_n \int g_nd\mu $$ Therefore, you get $$lim_n \int g_nd\mu \leq lim\inf_n\int f_n d\mu $$