Proof

Notice that we can write \(A \cup B\) as the disjoint union
\begin{equation*} A \cup B = (A-B) \cup (A \cap B) \cup (B-A). \end{equation*}
We can also write disjointly
\begin{gather*} A = (A-B) \cup (A \cap B)\\ B = (A \cap B) \cup (B-A) \end{gather*}
Hence,
\begin{align*} P(A) & + P(B) - P(A \cap B) \\ & = [P(A-B) + P(A \cap B)] \\ & + [P(A \cap B) + P(B-A)] - P(A \cap B)\\ & = P(A-B) + P(A \cap B) + P(B-A)\\ & = P(A \cup B) \end{align*}
in-context