Setting: My professor defined
A random variable $X: \Omega \to \mathbb{R}$ has a density $f:\mathbb{R} \to \mathbb{R}$ if for all $B \in \mathscr{B}$ $$P(X^{-1} (B)) = \int_\mathbb{R} 1_{B}(\lambda) f(\lambda) d\lambda.$$
Here $\mathscr B$ denotes the Borel-$\sigma$-Algebra on $\mathbb{R}$.
My Problem: I have to prove that a random variable $X : \Omega \to \mathbb{R}$ with continuously differentiable distribution function $F$ has a density $f$.
What I did so far: Since $F$ is continuously differentiable, I set $f:=F'$. Then $$ \int_\mathbb{R} 1_{(-\infty,c]} f(\lambda) d\lambda=\int_{-\infty}^cf(\lambda)d\lambda = F(c)-\lim_{c \to -\infty} F(c) = F(c) - \lim_{c \to -\infty} P(X\leq c)=F(c) = P(X^{-1}((-\infty,c]))$$ which shows the statement for sets of the form $B=(-\infty,c]$.
Where I failed: I can't show that this also holds for general $B \in \mathscr{B}$. I know that the sets $(-\infty,c]$ constitute a basis for the Borel-$\sigma$-Algebra but I don't know how to generalize the proof to more general Borel sets.
Can someone give me a just a hint on how to start? Any help is much appreciated!
P.S. I know that most books define "density" only by means of the sets $(-\infty,c]$ but my professor did not and I need to use his definitions.