Inverse image of a half line is an event if and only if the inverse image of all Borel sets is an event. Definition 1.
Let $(\Omega,\mathcal{F}, P)$ be a probability space. A random variable is a function $X=X(\omega): \Omega \rightarrow \mathbb{R}$ such that, for any $B \in \mathcal{B}(\mathbb{R})$,
$$
X^{-1}(B):=\{\omega \in \Omega: X(\omega) \in B\} \in \mathcal{F}
$$
Definition 2. Let $(\Omega,\mathcal{F}, P)$ be a probability space. A random variable is a function $X=X(\omega): \Omega \rightarrow \mathbb{R}$ such that, for any $t \in \mathbb{R}$,
$$
X^{-1}((-\infty,t]):=\{\omega \in \Omega: X(\omega) \leq t\} \in \mathcal{F}
$$

According to my professor, these two definitions are equivalent. He proves it as follows (short version):
Let $\mathcal{C}$ be the collection of all sets $B \in \mathcal{B}(\mathbb{R})$ such that $X^{-1}(B) \in \mathcal{F}$. Then $\mathcal{C}$ is a $\sigma$-algebra on $\mathbb{R}$. Now, let
$$
F = \{(-\infty, t] : t\in \mathbb{R}\}
$$
Then the $\sigma$-algebra generated by $F$ satisfies
$$
\sigma(F) \subset \mathcal{C}
$$
where $\sigma(F) = \mathcal{B}(\mathbb{R})$. But we assumed that $C \subset \mathcal{B}(\mathbb{R})$. Therefore $\mathcal{B}(\mathbb{R})=\mathcal{C}$ and so Defintion 1 is satisfied.

I cannot make sense of this proof for the life of me. I don't understand why $\mathcal{C}$ is involved, and I feel like there is a missing piece at the end of the proof that would tie it all together, but there's nothing there. How exactly are Definition 1 and Definition 2 equivalent? If there are any other proofs that make some more sense, please let me know. Thanks.
 A: There is even a faster, general way, if you are allowed to use a particular useful result which feels very intuitive. Let $X:\Omega \to A$. Consider $(\Omega,\mathscr{F}),(A,\mathscr{A})$. Let $\sigma(\mathscr{B})=\mathscr{A}$. We define
$$\sigma(X):=X^{-1}(\mathscr{A})=\{X^{-1}(C):C \in \mathscr{A}\}$$
We say that $X$ is measurable if $\sigma(X)\subset \mathscr{F}$ (this is Definition 1 in OP). Prove that
$$\sigma(X)\subset \mathscr{F} \iff X^{-1}(B) \in \mathscr{F},\,\forall B \in \mathscr{B}$$
(1) $(\Rightarrow)$ We have $\sigma(X)\subset \mathscr{F} \iff X^{-1}(C)\in \mathscr{F},\,\forall C \in \mathscr{A}$. But then
$$\mathscr{B}\subset \mathscr{A}\implies X^{-1}(B) \in \mathscr{F},\,\forall B \in \mathscr{B}$$
(2) $(\Leftarrow)$ Using the premise we have
$$X^{-1}(B) \in \mathscr{F},\,\forall B \in \mathscr{B} \iff X^{-1}(\mathscr{B})\subset \mathscr{F}\iff \sigma(X^{-1}(\mathscr{B}))\subset \mathscr{F}$$
However $\color{blue}{\sigma(X^{-1}(\mathscr{B}))=X^{-1}(\sigma(\mathscr{B}))=X^{-1}(\mathscr{A})}=\sigma(X)$ so $\sigma(X)\subset \mathscr{F}$.

The last result might not be a given and its proof might cause you problems in the same way your professor's proof did. Nevertheless, seeing another proof employing a similar trick might help you digest. We have
$$\mathscr{B}\subset \{C \in \mathscr{A}:X^{-1}(C) \in \sigma(X^{-1}(\mathscr{B}))\}\subset \mathscr{A}$$
To see that the family of sets in the middle is a $\sigma$-algebra, use the fact that inverse images preserve set operations. We then have
$$\mathscr{A}=\sigma(\mathscr{B})\subset \{C \in \mathscr{A}:X^{-1}(C) \in \sigma(X^{-1}(\mathscr{B}))\}\subset \mathscr{A}$$
$$\implies \mathscr{A}=\{C \in \mathscr{A}:X^{-1}(C) \in \sigma(X^{-1}(\mathscr{B}))\}$$
$$\implies X^{-1}(C)\in \sigma(X^{-1}(\mathscr{B})), \forall C \in \mathscr{A}$$
But then $X^{-1}(\mathscr{A})\subset \sigma(X^{-1}(\mathscr{B}))$. The reverse follows from
$$X^{-1}(\mathscr{B})\subset X^{-1}(\mathscr{A})\implies \sigma(X^{-1}(\mathscr{B}))\subset X^{-1}(\mathscr{A})$$
