A person --> disease --> test positive (red)
A person --> disease --> test negative (yellow)
A person --> no disease --> test positive (blue)
A person --> no disease --> test negative (green)
To better remember Bayes' rule, draw the above into a tree structure and mark the edges with color. Say we want to know P(disease | test positive). Given test result being positive, two possible paths are "red" and "blue", and conditional probability of having a disease is the conditional probability of being "red", thus P(red) / (P(red) + P(blue)). Apply chain rule and we have:
P(red) = P(disease) * P(test positive | disease)
P(blue) = P(no disease) * P(test positive | no disease)
P(disease | test positive) = P(disease) * P(test positive | disease) / (P(disease) * P(test positive | disease) + P(no disease) * P(test positive | no disease)) = P(disease, test positive) / P(test positive)