We will need the joint comulatice distribution function $F_{Y_1,Y_2}(u,v)=P(Y_1<u,Y_2<v).$
Now,
$$P(Y_1<u,Y_2<v)=P(Y_1<u,Y_2<v, X_1\le X_2)+P(Y_1<u,Y_2<v ,X_2<X_1)=$$
$$=P(X_1<u,X_2<v, X_1\le X_2)+P(X_2<u,X_1<v ,X_2<X_1).$$
First,
$$P(X_1<u,X_2<v, X_1\le X_2)=
\begin{cases}
-\frac{u^2}{2}+uv,&\text{ if }& 0\le u\le v \le 1\\
\frac{v^2}{2},&\text{ if }& 0\le v<u \le1
\end{cases}.$$
The figure below explains how I calculated the two pieces of surface area:
Second,
$$P(X_2<u,X_1<v ,X_2<X_1)=P(X_2<u,X_1<v, X_2\le X_1)=
\begin{cases}
-\frac{u^2}{2}+uv
,&\text{ if }& 0\le u\le v \le 1\\
\frac{v^2}{2},&\text{ if }& 0\le v<u \le1
\end{cases}.$$
(A figure similar to the one above would explain the latter result.)
We can calculate the joint cdf:
$$F_{Y_1,Y_2}(u,v)=$$$$=P(X_1<u,X_2<v, X_1\le X_2)+P(X_2<u,X_1<v ,X_2<X_1)=$$
$$=\begin{cases}
-u^2+2uv,&\text{ if }& 0\le u\le v \le 1\\
v^2,&\text{ if }& 0\le v<u \le1
\end{cases}.$$
The joint pdf can be calculated the following way:
$$f_{Y_1,Y_2}(u,v)=\frac{{\partial} ^2}{\partial u \partial v}F_{Y_1,Y_2}(u,v)=\begin{cases}
2,&\text{ if }& 0\le u\le v \le 1\\
0,&\text{ otherwise. }
\end{cases}$$
Then we will need the following marginal density:
$$f_{Y_2}(v)=\int_0^vf_{Y_1,Y_2}(u,v)du=2\int_0^v\ du=2v;\ 0\le v\le 1.$$
To answer the first question: By definition
$$f_{Y_1 \mid Y_2=v}(u)=\frac{f_{Y_1,Y_2}(u,v)}{f_{Y_2}(v)}=\begin{cases}
\frac{1}{v},&\text{ if }& 0\le u\le v \le 1\\
0,&\text{ else. }
\end{cases} \tag 1$$
To answer the second question: First let's calculate the cdf of $Y_2-Y_1$. By definition
$$F_{Y_2-Y_1}(x)=P(Y_2-Y_1<x)=E[P(Y_2-Y_1<x \mid Y_2)]. $$
Then
$$P(Y_2-Y_1<x \mid Y_2=v)=
\begin{cases}
0,&\text{ if } x<0\\
P(Y_1>v-x\mid Y_2=v),& \text{ if } 0\le x \le v \le 1\\
1,&\text{ if } x>v
\end{cases}$$
where $0\le v \le 1$.
Considering $(1)$ we have for $0\le x \le v \le 1$
$$P(Y_1>v-x\mid Y_2=v)=\frac 1v\int_{v-x}^v\ du=\frac xv.$$
So, for a given $0\le x \le 1$
$$P(Y_2-Y_1<x \mid Y_2=v)=\begin{cases}
1,& \text{ if } 0\le v\le x\\
\frac xv,&\text{ if } x\le v\le 1.\\
\end{cases}$$
As a result, for $0\le x \le 1$
$$F_{Y_2-Y_1}(x)=\int_0^1P(Y_2-Y_1<x \mid Y_2=v)f_{Y_2}(v)\ dv=$$
$$=2\int_0^x v \ dv + 2x\int_x^1 \ dv=2x-x^2.$$
Finally, $$f_{Y_2-Y_1}(x)=\begin{cases}
2-2x,& \text{ if } 0\le x \le 1 \\
0,&\text{ otherwise. }
\end{cases}$$
The conditional distribution you are looking for is the following
$$ P(X_i=k) =
\begin{cases}
\frac{n-r}{n}, & \text{if k=0} \\
\frac{r}{n}, & \text{if k=1}
\end{cases}$$
it is very easy to prove..
Without loss of generality let's prove the conditional distribution of $X_1$ (all the variables have the same density)
$$\mathbb{P}[X_1=0|\sum_iX_i=r]=\frac{\mathbb{P}[X_1=0;\sum_{i=1}^nX_i=r]}{\mathbb{P}[\sum_{i=1}^nX_i=r]}=$$
$$=\frac{\mathbb{P}[X_1=0;\sum_{i=2}^nX_i=r]}{\mathbb{P}[\sum_{i=1}^nX_i=r]}=\frac{\mathbb{P}[X_1=0]\mathbb{P}[\sum_{i=2}^nX_i=r]}{\mathbb{P}[\sum_{i=1}^nX_i=r]}=$$
$$\frac{(1-p)\binom{n-1}{r}p^r(1-p)^{n-1-r}}{\binom{n}{r}p^r(1-p)^{n-r}}=\frac{(n-1)!r!(n-r)!}{r!(n-1-r)!n!}=\frac{n-r}{n}$$
Similar brainstorming for $\mathbb{P}[X_1=1]$
Best Answer
Sure, you can work with the CDF as well but there is an easier way. Recall that for a random sample of size $n$ from a uniform (0,1) distribution, the joint density for all the order statistics is given by
$$f_{X_{(1)},X_{(2)},\ldots,X_{(n)}} \left(x_{(1)},x_{(2)},\ldots, x_{(n)} \right)=\begin{cases} n! & 0<X_{(1)}<X_{(2)}<\ldots<1 \\ 0 & \text{otherwise} \end{cases} $$
This is just all the possible permutations of the random variables. This density will serve as the numerator of your fraction. We need to integrate out the greatest order statistic so as to get the joint density of the remaining order statistics. Thus
$$f_{X_{(1)},X_{(2)},\ldots,X_{(n-1)}} \left(x_{(1)},\ldots,x_{(n-1)} \right)=\int \limits_{x_{(n-1)}}^{1} n!\ \mathrm{dy} =n!\left(1-x_{(n-1)}\right)$$
Putting these two together, gives the conditional probability you are looking for.