Probability of event given two depandant events
Let $A$, $B$, $C$ be three (potentially dependent) events. By the probability chain rule:
$$ P(A,B,C)=P(A|B,C)P(B,C)=P(A|B,C)P(B|C)P(C) $$
So we can do
\begin{align}
P(A|B,C) 
&amp;= \frac{ P(A,B,C)}{P(B|C)P(C)} \\
&amp;= \frac{ P(B,C|A) P(A) }{ P(B|C)P(C) } \\
&amp;= \frac{ P(B|A,C) P(A) P(C) }{ P(B|C)P(C) } \\
&amp;= \frac{ P(B|A,C) P(A) }{ P(B|C) }
\end{align}

See this related post and this one as well.