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.
You said that you know that $\sigma\left((-\infty,c]\ :\ c\in\mathbb R\right)=\mathscr B$.
Set $\mathbb Q(B)=\int_Bf(\lambda)\,\mathrm d\lambda$ for $B\in\mathscr B$. You have already proved that $\mathbb P\circ X^{-1}$ and $\mathbb Q$ coincide on the sets $(-\infty,c]$ which generate $\mathscr B$.
Define the set $$ \mathcal M=\left\{B\in\mathscr B\ :\ \mathbb P\circ X^{-1}(B)=\mathbb Q(B)\right\}\supset\left\{(-\infty,c]\ :\ c\in\mathbb R\right\}, $$ and check that $\mathcal M$ is a monotone class. Then, conclude by the monotone class theorem.