Probability that 2 geometric r.v.'s are equal Could someone explain why the first arrowed line is equal to the second arrowed line?


Note that $\Pr\{X=Y\}=1-\Pr\{X>Y\}-\Pr\{X<Y\}$. Now 
\begin{align}
\Pr\{X>Y\}&=\sum_{j=1}^{\infty}\Pr\{X>Y|Y=j\}\Pr\{Y=j\}\\
&=\sum_{j=1}^{\infty}\Pr\{X>j\}\Pr\{Y=j\}\\
&=\sum_{j=1}^{\infty}\Pr\{X\geq j+1\}\Pr\{Y=j\}\\
&=\sum_{j=1}^{\infty}(1-p)^j\times (1-q)^{j-1}q\\
&=\frac{q(1-p)}{p+q-pq}\\
\end{align}
and in the same fashion $$\Pr\{X<Y\}=\frac{p(1-q)}{p+q-pq}$$
Therefore 
\begin{align}
\Pr\{X=Y\}&=1-\frac{p(1-q)}{p+q-pq}-\frac{q(1-p)}{p+q-pq}\\
&=\frac{pq}{p+q-pq}
\end{align}
NOTE: the previous soltuion is a correct solution. My solution uses the hint, which I guess was given to use conditional probabilities.
