Proposition
Let $X$ be a Borel subset of $\mathbb{R}$.
Let $\mathfrak{B}$ the set of Borel subsets of $X$.
$(X, \mathfrak{B})$ is a measurable space.
Let $f\colon X \rightarrow [-\infty, \infty]$ be a monotone function.
Then $f$ is measurable.
Proof:
Without loss of generality, we can assume that $f$ is non-decreasing.
Let $a \in (-\infty, \infty)$.
Let $E_a = \{x \in X; f(x) > a\}$.
Let $c = \inf E_a$.
It suffices to prove that $E_a$ is a Borel subset.
Case 1. $c \in E_a$.
Let $x \in X \cap [c, \infty)$
Since $c \le x$, $a < f(c) \le f(x)$.
Hence $x \in E_a$.
Conversely suppose $x \in E_a$.
Since $c \le x, x \in X \cap [c, \infty)$.
Therefore $E_a = X \cap [c, \infty)$.
Case 2. $c$ does not belong to $E_a$.
Let $x \in X \cap (c, \infty)$.
There exists $y \in E_a$ such that $c < y < x$.
Since $a < f(y) \le f(x), f(x) > a$.
Hence $x \in E_a$.
Conversely suppose $x \in E_a$.
Since $c \le x$ and $c$ does not belong to $E_a$, $x \in X \cap (c, \infty)$.
Therefore $E_a = X \cap (c, \infty)$.
QED