What is the probability that the first ball drawn was black, given the event $X_3 \leq 5$ Im trying to solve the following question:

There is a urn with 1 black ball and 1 red ball. A ball is drawn at random
from the urn, it is placed back in the urn along with 2 more balls with the
same color as the ball that was drawn. Denote the random variable Xi to be
the number of black balls after the i-th draw, i = 1, 2, . . .. Note that $X_i$ is
the random variable for number of black balls in the urn including the two
new balls added after the i-th draw. What is the probability that the first ball drawn was black, given the event $X_3 \leq 5$?

This is what I have so far:
$$P(X_3=1 | X_3\leq 5)=\frac{P(X_3=1 \cap X_3\leq 5)}{P(X_3\leq 5)}=\frac{P(X_3=1)}{P(X_3=1)+P(X_3=3)+P(X_3=5)}$$
Hence,
$$\frac{\frac{5}{16}}{\frac{5}{16}+\frac{3}{16}+\frac{3}{16}}$$
Correct?
 A: You calculated $P(X_3=1\mid X_3\le5)$ correctly, but that’s not what the questions asks for – it asks for $P(X_1=3\mid X_3\le5)$.
That the first ball drawn is black and $X_3\le5$ happens if the first ball drawn is black, with probablity $\frac12$, and then the second ball drawn is red, with probability $\frac14$, or it’s black, with probability $\frac34$, but then the third ball drawn is red, with probability $\frac16$.
That $X_3\le5$ happens unless $X_3=7$, with probability $\frac12\cdot\frac34\cdot\frac56$. Thus
\begin{eqnarray}
P(X_1=3\mid X_3\le5)
&=&
\frac{P(X_1=3\cap X_3\le5)}{P(X_3\le5)}
\\
&=&
\frac{\frac12\left(\frac14+\frac34\cdot\frac16\right)}{1-\frac12\cdot\frac34\cdot\frac56}
\\
&=&
\frac{\frac3{16}}{\frac{11}{16}}
\\
&=&
\frac3{11}\;.
\end{eqnarray}
Because multiple wrong answers (including my own initial answer) were given, I wrote this Java code to double-check the result by simulation. It confirms the result $\frac3{11}$.
A: With a decision tree, the process is long, it is certainly not optimal, but it is always a good tool to obtain the result.
We collect all options (8 options)
1st level : P(B)=1/2 , P(W)=1/2
2nd level : $P(BB)=(1/2)\times(3/4)$, $P(BW)=(1/2)\times(1/4)$,$P(WB)=(1/2)\times(1/4)$, $P(WW)=(1/2)\times(3/4)$
3rd level :
$P(BBB)=(1/2)\times(3/4)\times(5/6)$, $P(BBW)=(1/2)\times(3/4)\times(1/6)$
$P(BWB)=(1/2)\times(1/4)\times(3/6)$, $P(BWW)=(1/2)\times(1/4)\times(3/6)$
$P(WBB)=(1/2)\times(1/4)\times(3/6)$, $P(WBW)=(1/2)\times(1/4)\times(3/6)$
$P(WWB)=(1/2)\times(3/4)\times(1/6)$, $P(WWW)=(1/2)\times(3/4)\times(5/6)$
We know that the result is not BBB. So, we exclude this row.
Total of remaining values is $1-P(BBB)=11/16$
Total of 'success-values' is $P(BBW)+P(BWB)+P(BWW)= 3/16$
Probability is $(3/16)/(11/16) = 3/11$
A: $X_3$ can only be $>5$ (indeed $7$) if black is drawn all the way, which happens with probability
$$\frac12×\frac34×\frac56=\frac5{16}$$
There is a $\frac12$ chance of the first draw being black  and from there $X_3>5$ happens with probability equal to the last two terms above, i.e. $\frac58$. Then the final answer is
$$\frac{(1/2)(1-5/8)}{1-5/16}=\frac3{11}$$
