Need help in understanding the proof for Theorem 11.17 in Baby Rudin 
I don't understand why the first two equality signs hold in the proof. 

$g(x) > a \iff \sup_n f_n(x) > a$, i.e. there is some $n$ for which $f_n(x) > a$. So, $$\{x \mid g_n(x) > a\} = \bigcup_{n=1}^\infty \{x \mid f_n(x) > a\}.$$
The second equality sign follows by definition of the $\limsup$.
