Below is an example that I want to talk about:

I'm going to define variable names based on the first letter as described in the bubbles. One question I have is how would I calculate $P(M|B)$? This is what I got so far: $$P(M|B) = \dfrac{P(M,B)}{P(B)}$$ Since $P(B)$ is known then I move on to the numerator: $$P(M,B) = P(M,B,J,E,A)+P(M,B,\neg J, E,A)+P(M,B,J,\neg E,A)+P(M,B,J, E,\neg A)+P(M,B,\neg J,\neg E,A)+P(M,B,\neg J, E,\neg A)+P(M,B,J, \neg E,\neg A)+P(M,B,\neg J, \neg E,\neg A)$$ Is this really the way? I'm surprised to see how much computation I have to do for such a small problem. Am I doing this correctly?
Well, the joint probability distribution is $$p(B,E,A,J,M) = p(B) p(E) p(A\mid B,E) p(J\mid A) p(M\mid A).$$ What your are looking for is the marginal distribution $$p(M,B) = \sum_{E,A,J} p(B,E,A,J,M),$$ where the sum is over all values of $E,A,J$ and this is what you did right!