The conditional probability p(A|B) of A given B is defined as p(A,B)/P(B), where p(A,B) is the probability of both A and B. From this it follows that p(A,B)=p(A|B)p(B). But by the same reasoning p(A,B)=p(B|A)p(A). Hence p(B|A)p(A)=p(A|B)p(B), and p(A|B)=p(B|A)p(A)/p(B). Q.E.D. (Extending the theorem beyond the two-event case is left as an exercise to the reader.)