We know that \(\displaystyle{P}{\left({A}∣{B}\right)}={P}\frac{{{A}\cap{B}}}{{P}}{\left({B}\right)}.\)

Now

\(\displaystyle{P}{\left({A}\cup{B}∣{D}\right)}={P}\frac{{{\left({A}∪{B}\right)}\cap{D}}}{{P}}{\left({D}\right)}={P}\frac{{{\left({A}∩{D}\right)}\cup{\left({B}\cap{D}\right)}}}{{P}}{\left({D}\right)}={P}{\left({A}\cap{D}\right)}+{P}{\left({B}\cap{D}\right)}−{P}\frac{{{A}\cap{B}\cap{D}}}{{P}}{\left({D}\right)}={P}\frac{{\frac{{{A}\cap{D}}}{{P}}{\left({D}\right)}+{P}\frac{{{B}\cap{D}}}{{P}}{\left({D}\right)}-{P}{\left({A}\cap{B}\cap{D}\right)}}}{{P}}{\left({D}\right)}={P}{\left({A}{\mid}{D}\right)}+{P}{P}{\left({B}{\mid}{D}\right)}-{P}{\left({A}\cap{B}{\mid}{D}\right)}.\)

Now

\(\displaystyle{P}{\left({A}\cup{B}∣{D}\right)}={P}\frac{{{\left({A}∪{B}\right)}\cap{D}}}{{P}}{\left({D}\right)}={P}\frac{{{\left({A}∩{D}\right)}\cup{\left({B}\cap{D}\right)}}}{{P}}{\left({D}\right)}={P}{\left({A}\cap{D}\right)}+{P}{\left({B}\cap{D}\right)}−{P}\frac{{{A}\cap{B}\cap{D}}}{{P}}{\left({D}\right)}={P}\frac{{\frac{{{A}\cap{D}}}{{P}}{\left({D}\right)}+{P}\frac{{{B}\cap{D}}}{{P}}{\left({D}\right)}-{P}{\left({A}\cap{B}\cap{D}\right)}}}{{P}}{\left({D}\right)}={P}{\left({A}{\mid}{D}\right)}+{P}{P}{\left({B}{\mid}{D}\right)}-{P}{\left({A}\cap{B}{\mid}{D}\right)}.\)