Composition of measurable & continuous functions, is it measurable? I am working on this problem$^{(1)}$ on Lebesgue measurability of composition of Lebesgue measurable function and a continuous function:

Show that $g \circ f$ is Lebesgue measurable, if $f: X \to \mathbb R$ is Lebesgue measurable and if $g: \mathbb R \to \mathbb R$ is continuous.

Prior to this posting, I did lots of research online. First, I found this 6-year-old solution to a problem very similar to mine here at MathHelpForum, but on closer inspection I think not only the author left lots of gap, but also I am not sure if this is a correct solution, and on top of it I do not really understand it. And then internally in MSE, I found this 2012's posting and also this 2013's posting, which are similar but not exactly the same.
In my naive logic, I am thinking of first proving that $g$ is measurable because of its continuity, and then since composition of 2 measurable functions is measurable, therefore $g \circ f$ is measurable. But my logic is unreliable, please help me with the right direction and also steps to solve this question.
Thank you very much for your time and help.

Oops!
I forget to include definition to Lebesgue measurability and Lebesgue measurable function until @PhoemueX brought it up. The problem with this text is that it does not have one nice, stand-alone paragraph definition. According to its index, it is written here and there on pages 21, 27 and 39. Here is what I managed to piece them together from those pages:

Let $X = \mathbb R$ and let $\mathcal C$ be the collection of intervals of the form $(a, b]$... Let $\mathcal l(I) = b - a$ if $I = (a, b]$... Define $\mu^*$ as an outer measure... however, that if we restrict $\mu^*$ to a $\sigma$-algebra $\mathcal L$ which is strictly smaller than the collection of all subsets of $\mathbb R$, then $\mu^*$ will be a measure on $\mathcal L$. That measure is what is known as Lebesgue measure. The $\sigma$-algebra $\mathcal L$ is called the Lebesgue $\sigma$-algebra.... A set is Lebesgue measurable if it is in the Lebesgue $\sigma$-algebra.
If $X$ is a metric space, $\mathcal B$ is the Borel $\sigma$-algebra, and $f: X \to \mathbb R$ is measurable with respect to $\mathcal B$, we say $f$ is Borel measurable. If $f : \mathbb R \to \mathbb R$ is measurable with respect to the Lebesgue $\sigma$-algebra, we say $f$ is Lebesgue measurable function.

Footnotes: 
(1) Richard F. Bass' Real Analysis, 2nd. edition, chapter 5: Measurable Functions, Exercise 5.6, page 44. 
 A: Edit: following the comment of kahen below, I modified my answer: Lebesgue-measurability of a function $h$ is measurability of $h\colon (X,\mathcal{L}_X)\to (Y,\mathcal{B}_{Y})$, not $h\colon (X,\mathcal{L}_X)\to (Y,\mathcal{L}_{Y})$)

You have that $f\colon (X,\mathcal{L}_X)\to (\mathbb{R},\mathcal{B}_\mathbb{R})$ is Lebesgue-measurable (for the $\sigma$-algebras $\mathcal{L}_X$, $\mathcal{B}_\mathbb{R}$). As $g\colon \mathbb{R}\to \mathbb{R}$ is continuous, it is Borel-measurable ($g\colon (\mathbb{R},\mathcal{B}_\mathbb{R})\to (\mathbb{R},\mathcal{B}_\mathbb{R})$ is measurable for the $\sigma$-algebras $\mathcal{B}_\mathbb{R}$, $\mathcal{B}_\mathbb{R}$). You want to show that $g\circ f$ is Lebesgue-measurable. i.e. $g\circ f \colon (X,\mathcal{L}_X)\to (\mathbb{R},\mathcal{B}_\mathbb{R})$ is measurable.
Take any $B\in\mathcal{B}_\mathbb{R}$: you need to show that $(g\circ f)^{-1}(B)\in \mathcal{L}_X$.
By measurability of $g$, you have that for since $B\in\mathcal{B}_\mathbb{R}$,   $B^\prime = g^{-1}(B)\in \mathcal{B}_\mathbb{R}$. By measurability of $f$, this implies that $f^{-1}(B^\prime)\in \mathcal{L}_X$, i.e. $(g\circ f)^{-1}(B)\in \mathcal{L}_X$. This shows that $g\circ f$ is measurable for the $\sigma$-algebras $\mathcal{L}_X$, $\mathcal{B}_\mathbb{R}$ (i.e., $g\circ f\colon (X, \mathcal{L}_X)\to (\mathbb{R}, \mathcal{B}_\mathbb{R})$ is measurable), as wanted.
A: Note that $ (g \circ f)^{-1}(A)=f^{-1}(g^{-1}(A))$. You need to show this is Lebesgue measurable if $ A $ is open. Now the key is that if $A$ is open, then so is $ g^{-1}(A) $. So $(g \circ f)^{-1}(A)=f^{-1}(B) $ where $ B $ is open. Conclude from there.
