The conditional probability
\[\begin{equation*} P(A | B) = \frac{P(A) \, P(B | A)}{P(B)} \end{equation*} \]
given \(P(B) \neq 0\).
N.B. If some probability, such as \(P(B)\) is unknown,
\[\begin{equation*} \begin{array}{r|cc} & B & \lnot B \\ \hline A & s & t \\ \lnot A & u & v \end{array} \end{equation*} \]
\[\begin{align*} P(A | B) = \frac{P(A) \, P(B | A)}{P(B)} \iff P(A) \, P(B | A) = P(B) \, P(A | B). \end{align*} \]
\[\begin{equation*} \begin{array}{ccccccc} P(A) & \cdot & P(B|A) & = & P(B) & \cdot & P(A|B) \\[3ex] \begin{array}{cc} \boxed{s} & \boxed{t} \\ u & v \end{array} & \cdot & \begin{array}{cc} \boxed{s} & t \\ \bcancel{u} & \bcancel{v} \end{array} & = & \begin{array}{cc} \boxed{s} & t \\ \boxed{u} & v \end{array} & \cdot & \begin{array}{cc} \boxed{s} & \bcancel{t} \\ u & \bcancel{v} \end{array} \\[3ex] \dfrac{s + t}{s + t + u + v} & \cdot & \dfrac{s}{s + t} & = & \dfrac{s + u}{s + t + u + v} & \cdot & \dfrac{s}{s + u} \end{array} \end{equation*} \]
\[\begin{align*} \frac{s + t}{s + t + u + v} \cdot \frac{s}{s + t} & \stackrel{?}{=} \frac{s + u}{s + t + u + v} \cdot \frac{s}{s + u} \\[2ex] \frac{\cancel{(s + u)} s}{(s + t + u + v) \cancel{(s + u)}} & = \frac{\cancel{s + t) s}}{(s + t + u + v) \cancel{(s + t)}} \\[2ex] \frac{s}{s + t + u + v} & = \frac{s}{s + t + u + v} \\[2ex] 1 & \stackrel{\checkmark}{=} 1. \end{align*} \]
\(\blacksquare\)
See the law of total probability.