Finding the distributions of the max and min of random variables from the geometric distribution Let $X$ and $Y$ be independent random variables following the same geometric distribution, that is $P(X=k)=P(Y=k) = (1-p)p^k, k=0,1,\ldots,$. Let $U=min\{X,Y\}$, $V=max\{X,Y\}$,and $W=V-U$. How do I compute $P(U=i)$ and $P(W=j)$?
The problem gives me a hint for each, but I don't really understand them.
It gives me
$$P(U=i) = \sum_{j=1}^\infty P(X=i,Y=j) + \sum_{j=i+i}^\infty P(X=j, Y=i)=(1-p^2)p^{2i}$$
but I am unsure where this comes from.
It also gives me that $j=1,2,...$
$$P(W=j) = \sum_{j=0}^\infty P(X=i,Y=i+j) + \sum_{i=0}^\infty P(X=i+j, Y=i)=\frac{2(1-p)p^j}{1+p}$$
and for $j=0$
$$P(W=0)=P(W=Y)=\sum_{i=0}^\infty P(X=i,Y=i)=\frac{1-p}{1+p}$$
but again I am unsure where this comes from.
If anyone has any information on how I would be able to set these equations up and how to simplify them to the answers it would be greatly appreciated.

Although there are closed-form solutions for the distribution of the order statistics of discrete random variables, the problem can also can be answered by transforming events of $U$ or $W$ into events of $X$ and $Y$.  First note that $X$ and $Y$ are i.i.d. and $\mbox{Pr}[X \ge i] = p^i$.
For instance, if we observe the event $U = i$, then there are three cases: (1) $\left(X=i, Y=i\right)$, (2) $\left(X=i, Y>i\right)$, (3) $\left(X>i, Y=i\right)$.  Now we can combine case (1) with either case (2) or case (3).  Combining it with case (2), we have two sets of events: (1*) $\left(X=i, Y \ge i\right)$ and (2*) $\left(X>i, Y=i\right)$.  Since the events (1*) and (2*) are mutually exclusive and equivalent to the event $U=i$, we have that
\begin{eqnarray*}
\mbox{Pr} \left[U=i\right] &=& \mbox{Pr} \left[X=i, Y \ge i\right] + \mbox{Pr} \left[X>i, Y=i\right] \\
&=& \sum_{j=i}^\infty \mbox{Pr} \left[X=i, Y =j \right] + \sum_{j=i+i}^\infty \mbox{Pr} \left[X=j, Y =i \right].
\end{eqnarray*}
Using the fact that $X$ and $Y$ are i.i.d., we can simplify the above to
\begin{eqnarray*}
\mbox{Pr} \left[U=i\right] &=& \mbox{Pr} \left[X=i\right] \left(\mbox{Pr} \left[Y \ge i\right]+ \mbox{Pr} \left[X>i\right] \right) \\
&=& \mbox{Pr} \left[X=i\right] \left(\mbox{Pr} \left[Y \ge i\right]+ \mbox{Pr} \left[X \ge i+1\right] \right) \\
&=& (1-p)p^i \left(p^i + p^{i+1}\right) \\
&=& (1-p)(1+p)p^{2i} \\
&=& (1-p^2)p^{2i}.
\end{eqnarray*}
Now to calculate the distribution of the range of a discrete random variable, we generally split it up into the case $W=0$ and $W \ne 0$.  If $W=0$, then clearly the maximum and minimum of $(X,Y)$ must be equal; hence, $X=Y=i$ for all $i \in \{0, 1, \cdots \}$.  Therefore,
\begin{eqnarray*}
\mbox{Pr} \left[W=0\right] &=& \sum_{i=0}^\infty \mbox{Pr} \left[X=i, Y = i \right] \\
&=& (1-p)^2 \sum_{i=0}^\infty p^{2i} \\
&=& \frac{(1-p)^2}{1-p^2} \\
&=& \frac{1-p}{1+p}.
\end{eqnarray*}
Finally, consider the event $W=j$ for $j \in \{1, 2, \cdots \}$.  Clearly for $j \ne 0$, $X \ne Y$; hence, if $X>Y$ then the event $W=j$ is equivalent to the event $X-Y=j$ and if $Y>X$ then the event $W=j$ is equivalent to the event $Y-X=j$.  Thus the event $W=j$ is equivalent to the event that the difference of $X$ and $Y$ and the the difference of $Y$ and $X$ are both $j$.  If $X-Y=j$, then this is equivalent to the event that $(X=i+j,Y=i)$ for $i \in \{0, 1, \cdots \}$.  Likewise if $Y-X=j$, then this is equivalent to the event that $(X=i,Y=i+j)$ for $i \in \{0, 1, \cdots \}$.  Coupling these results, we have that for $j \ne 0$
\begin{eqnarray*}
\mbox{Pr} \left[W=j\right] &=&  \sum_{i=0}^\infty \mbox{Pr} \left[X=i+j, Y = i \right] + \sum_{i=0}^\infty \mbox{Pr} \left[X=i, Y = i+j \right] \\
&=& 2(1-p)^2p^j \sum_{i=0}^\infty p^{2i} \\
&=& 2\frac{1-p}{1+p}p^j.
\end{eqnarray*}
