[proofplan]
The proof is a direct unpacking of the definitions. For a fixed real number $x$, the event $\{X\le x\}$ is the preimage of the Borel set $(-\infty,x]$ under $X$. The definition of the [cumulative distribution function](/page/Cumulative%20Distribution%20Function) identifies $F_X(x)$ with the probability of this event, and the definition of a probability density function evaluates that probability as the [Lebesgue integral](/page/Lebesgue%20Integral) of $f_X$ over $(-\infty,x]$.
[/proofplan]
[step:Identify the CDF value with the law of $X$ on $(-\infty,x]$]
Fix $x\in\mathbb R$. Define the Borel set
\begin{align*}
A_x:=(-\infty,x]\in\mathcal B(\mathbb R).
\end{align*}
The law of $X$ is the probability measure
\begin{align*}
\mu_X:\mathcal B(\mathbb R)\to[0,1],\qquad A\mapsto \mathbb P(X^{-1}(A)).
\end{align*}
Since $X^{-1}(A_x)=\{\omega\in\Omega:X(\omega)\le x\}$, the definition of the cumulative distribution function gives
\begin{align*}
F_X(x)=\mathbb P(X\le x)=\mu_X(A_x).
\end{align*}
[guided]
Fix $x\in\mathbb R$. We want to rewrite the event appearing in the CDF as a Borel-set evaluation of the distribution of $X$. Define
\begin{align*}
A_x:=(-\infty,x].
\end{align*}
This set belongs to $\mathcal B(\mathbb R)$ because it is closed in $\mathbb R$.
Define the law of $X$ as the probability measure
\begin{align*}
\mu_X:\mathcal B(\mathbb R)\to[0,1],\qquad A\mapsto \mathbb P(X^{-1}(A)).
\end{align*}
The [random variable](/page/Random%20Variable) hypothesis means $X:(\Omega,\mathcal F)\to(\mathbb R,\mathcal B(\mathbb R))$ is measurable, so $X^{-1}(A)\in\mathcal F$ for every $A\in\mathcal B(\mathbb R)$; hence the expression defining $\mu_X(A)$ is meaningful.
For the particular Borel set $A_x=(-\infty,x]$, its preimage is exactly the event that $X$ is at most $x$:
\begin{align*}
X^{-1}(A_x)=\{\omega\in\Omega:X(\omega)\le x\}.
\end{align*}
Therefore, by the definition of the cumulative distribution function,
\begin{align*}
F_X(x)=\mathbb P(X\le x)=\mu_X(A_x).
\end{align*}
This step only translates the same probability into the language of the law of $X$, which is the language in which the density hypothesis applies.
[/guided]
[/step]
[step:Apply the density formula to the half-line $(-\infty,x]$]
By hypothesis, $f_X$ is a probability density function for $X$, so for every Borel set $A\in\mathcal B(\mathbb R)$,
\begin{align*}
\mu_X(A)=\mathbb P(X\in A)=\int_A f_X(t)\,d\mathcal L^1(t).
\end{align*}
Applying this identity to the Borel set $A_x=(-\infty,x]$ gives
\begin{align*}
\mu_X(A_x)=\int_{(-\infty,x]} f_X(t)\,d\mathcal L^1(t).
\end{align*}
Combining this with $F_X(x)=\mu_X(A_x)$ yields
\begin{align*}
F_X(x)=\int_{(-\infty,x]} f_X(t)\,d\mathcal L^1(t).
\end{align*}
Since $x\in\mathbb R$ was arbitrary, the identity holds for every $x\in\mathbb R$.
[/step]