Question on Borel Measurable Functions and Borel Sigma Algebras.
Note that for $b \in \Bbb{R}$
$f^{-1}((-\infty,b])=A \setminus f^{-1}(b,+\infty)$ which is a Borel set.
The family of sets of the form $(-\infty,b]$ with the empty set,generate the Borel sigma algebra.
So if you show that $A=\{B \subseteq R: f^{-1}(B) \text{is Borel}\}$ is a sigma algebra then you are done since this sigma algebra contains the sets of the form $(-\infty,b]$ and the empty set,so it will contain the Borel sigma algebra by definition.
To show that $A$ is sigma algebra,just use the fact that the inverse image of a union is the union of the inverse images and
if $B \subseteq \Bbb{R}$ then $f^{-1}(B^c)=A \setminus f^{-1}(B)$
The Borel $\sigma$-algebra of some topological space $A$ is defined as the smallest $\sigma$-algebra that contains all the open sets of $A$.
When we says that a function $f:A\to\overline{\Bbb R}$ is Borel measurable we are assuming the standard topology in $\overline{\Bbb R}$ and that if $C\subset \overline{\Bbb R }$ is a Borel set then $f^{-1}(C)$ is Borel in the induced Borel $\sigma$-algebra of $A$.
By the properties of $f^{-1}$ respect to set operations it can be shown that it is enough to say that $f^{-1}(C)$ is Borel in $A$ for any $C$ of the form $[-\infty,a)$, as is generally explained in any analysis textbook that cover an introduction to Lebesgue integration theory.