Whenever you want to switch conditional probabilities, use this.
comes from the law of total probability is the "prior probability" - this is an unconditional probability. In our example, probability of being male is probability of A with condition B - this must be known from collecting data. In our example this is the probability of left-handedness in males, which is known.
is the posterior probability - this is what we are always trying to calculate. This is based on the prior probability and some data on this population. In our example, this is the probability that a left-handed person is male.