Bayes' theorem
Substituting using Bayes' theorem gives the law of total probability