Suppose $f$(x,y) is a function on $\mathbb{R}^{2}$ that is separately continuous: for each fixed variable, $f$ is continuous in the other variable. Prove that $f$ is measurable on $\mathbb{R}^{2}$.
There is also a hint: Approximate $f$ in the variable $x$ by piecewise-linear functions $f_n$ so that $f_n$ $\rightarrow$ $f$ pointwise.
I don't get how to prove the problem via this hint, or is there any other approach?