Measurability of almost everywhere continuous functions
Use the fact that the Lebesgue measure is complete, i.e., every subset of a measurable set of measure zero is measurable and has measure zero (at worse, every measure has a completion). Now, let $I:=[0,1]$ , and let $S \subset [0,1]$ be the set of measure zero. Then $I= S \cup (S^c)$. We can use the classical definition that $f$ is measurable iff the inverse image of an open set is measurable, while breaking up $I:=[0,1]$ into the union of $S$ ; the measure-zero subset where $f$ is not continuous, and $I\S$ , where $f$ is continuous, and consider the inverse image intersected with each of the two sets (and then consider the union of the inverse images):
Now, let $U$ be open in $\mathbb R$ . Then , $f^{-1}(U)=[f^{-1}(U) \cap(S)] \cup [f^{-1}(U)\cap(S^c)] $. Now, $f$ is continuous in $S^c$, so that $f^{-1}(U)\cap S^c $ is open in $[0,1]$ , and $f^{-1}(U) \cap S $ is a subset of the measurable set $S$ of measure zero, so that $f^{-1}(U) \cap S:=V$ is measurable, ( with measure zero). Then $f^{-1}U)$ is the union of an open set --which is measurable , and a measurable set $V$ ( with measure zero, but we only care that it is measurable), so the inverse image of the open set $U$ of $\mathbb R$ is the union of two measurable sets, and so it follows, it is measurable, so that $f$ is measurable.
If you show that the inverse image of any open interval of the form $(a,\infty)$ is a measurable set, you can conclude that the inverse image of any Borel set is a measurable set. This is because these intervals generates the Borel $\sigma-$algebra. I hope it can help you.