Suppose I have the following:
And I want to calculate the following:
$P(B=true|J=true,M=true),A-E$
I have found online this link with examples about Variable Elimination.
where here in my case the order is $A,E$
I don't really get how they got this numbers in the answer
The following table is also given if it help:
Var B
Values: true,false
Parents: none
CPT:
=true,0.001
Var E
Values: true,false
Parents: none
CPT:
=true,0.002
Var A
Values: true,false
Parents: B,E
CPT:
true,true,=true,0.95
true,false,=true,0.94
false,true,=true,0.29
false,false,=true,0.001
Var J
Values: true,false
Parents: A
CPT:
true,=true,0.9
false,=true,0.05
Var M
Values: true,false
Parents: A
CPT:
true,=true,0.7
false,=true,0.01
The answer should be:
$0.28417,7,16$
Can someone please explain how they got to this numbers at the answer?

$\small{\begin{align} \mathsf P(A\;\mid B\;)&=\mathsf P(E)~\mathsf P(A\;\mid B\;,E)+\mathsf P(E^\complement)~\mathsf P(A\;\mid B\;,E^\complement) \\ \mathsf P(A\;\mid B^\complement)&=\mathsf P(E)~\mathsf P(A\;\mid B^\complement,E)+\mathsf P(E^\complement)~\mathsf P(A\;\mid B^\complement,E^\complement) \\ \mathsf P(A^\complement\mid B\;)&=\mathsf P(E)~\mathsf P(A^\complement\mid B\;,E)+\mathsf P(E^\complement)~\mathsf P(A^\complement\mid B\;,E^\complement) \\ \mathsf P(A^\complement\mid B^\complement)&=\mathsf P(E)~\mathsf P(A^\complement\mid B^\complement,E)+\mathsf P(E^\complement)~\mathsf P(A^\complement\mid B^\complement,E^\complement) \\\; \mathsf P(A\;) &= \mathsf P(B)~\mathsf P(A\;\mid B\;)+\mathsf P(B^\complement)~\mathsf P(A\;\mid B^\complement) \\ \mathsf P(A^\complement) &= \mathsf P(B)~\mathsf P(A^\complement\mid B\;)+\mathsf P(B^\complement)~\mathsf P(A^\complement\mid B^\complement) \\ \mathsf P(J,M) &=\mathsf P(A)~\mathsf P(J\mid A)~\mathsf P(M\mid A)+\mathsf P(A^\complement)~\mathsf P(J\mid A^\complement)~\mathsf P(M\mid A^\complement) \\ \mathsf P(B, J,M) &=\mathsf P(B)~(\mathsf P(A\mid B)~\mathsf P(J\mid A)~\mathsf P(M\mid A)+\mathsf P(A^\complement\mid B)~\mathsf P(J\mid A^\complement)~\mathsf P(M\mid A^\complement)) \\ \mathsf P(B\mid J, M)&=\dfrac{\mathsf P(B,J,M)}{\mathsf P(J,M)} \end{align}}$