In my course notes there is this theorem that says if two finite measures agree on a $\pi$-system then they agree on the whole of the $\sigma$-algebra generated by the $\pi$-system.
Theorem:
Let $\Omega$ be a set, $\mathcal{A} \subseteq 2^\Omega$ be a $\pi$-system on $\Omega$ and $\sigma(\mathcal{A}) := \mathcal{F}$ be the sigma algebra generated by $\mathcal{A}$. Let $\mu_1,\mu_2: \mathcal{F} \rightarrow \bar{\mathbb{R}}$ be two measures on $\mathcal{F}$ with $\mu_1(\Omega) = \mu_2(\Omega) < \infty$. If $\mu_1(A) = \mu_2(A)$ for all $A \in \mathcal{A}$ then $\mu_1(A) = \mu_2(A)$ for all $A \in \mathcal{F}$.
The hints given to prove it are to define a set: $$\mathcal{D} = \{A \in \mathcal{F}: \mu_1(A) = \mu_2(A) \}$$
and then show that $\mathcal{D}$ is a $\lambda$-system containing $\mathcal{A}$ and use the $\pi-\lambda$ theorem to conclude $\mathcal{D} = \mathcal{F}$
I have managed to complete all of this but I am having trouble understanding how this proves this result. I understand $\mathcal{D}$ to be the set of all sets where the two measures agree on $\mathcal{F}$ and then by showing $\mathcal{D} = \mathcal{F}$ we are showing that the sets where the measures agree are all the sets in $\mathcal{F}$. How does this make a conclusion related to the original $\pi$-system.