Prove that if $f: X \rightarrow \mathbb{R}$ is measurable, and $g: \mathbb{R} \rightarrow \mathbb{R}^*$ is Borel measurable
then $g \circ f:X \rightarrow \mathbb{R}^*$ is measurable.
Could someone please explain to me first, what it means for a function to be Borel Measurable, I can't seem to find an exact definition.
So far the best one that I have is that a function is Borel Measurable if the pre-image of any open set is again a Borel set.
Now I try to use the definition that a for a measure space $(X, \mathcal{A}, \mu)$ and topological space $(Y,T)$ with $f: X \rightarrow Y$, $f$ is measurable if and only if
$f^{-1}(B) \in \mathcal{A}, \forall B \in B(Y,T)$
so I try to say that let $A \in \mathcal{A}$ be an open set.
Now $(g \circ f)^{-1}(A) = f^{-1}(g^{-1})(A)$ and since $g$ is Borel measurable would that mean that $g^{-1}(A) \in B(Y,T)$? so then we would have $f^{-1}(g^{-1}(A)) \in \mathcal{A}$ and hence $g \circ f $ is measurable?