I see that I am struggling with a rigorous (measure-theoretic) derivation for an intuitive fact. Let $(\mathcal{X}, \Omega, P)$ be a measure space with probability measure $P$. Furthermore, let $X_1 : \mathcal{X} \mapsto \mathbb{R}$ be a random variable and $X_2$ be another random variable $X_2 : \mathcal{X} \mapsto \mathbb{R}$ defined as $X_2 := f(X_1)$, with measurable $f$. I would like to formally show that
$$P(X_2 \in \mathbf{B}| X_1) = \delta_{f(X_1)}(\mathbf{B}).$$
How would one go on about that? I am not very familiar with conditional measures, so I guess this is where my difficulty stems from.
If $g$ is measurable, bounded we have $E[g(X_2)|X_1]=E[(g\circ f)(X_1)|X_1]=(g\circ f)(X_1)$. Now choose $g(x)=\mathbf{1}_B(x)$ for $B$ Borel set, we get $P(X_2\in B|X_1)=\mathbf{1}_B(f(X_1))=\delta_{f(X_1)}(B)$. Note these are rvs and equalities hold a.s.