This is my attempt:
I have, so far, let
$$Y_{mi} = \begin{cases} 1\ & \text {if }i^\text{th } \text{trial in first }m\text{ trials}\\ 0&\text{otherwise} \end{cases}$$
Indeed, $$Y_m = \sum_{i=1}^mY_{mi}$$
I think this is what I need to calculate:
$$P(Y_{mi} =1 | X=x) = \frac{P(Y_{mi} =1, X=x)}{P(X=x)}$$
I am struggling to go from here and any help would be appreciated!