TITLE: Why is $\frac{p(1-p)}{1−(1−p)^2}=\frac{1-p}{2-p}$?
QUESTION [6 upvotes]: I found this solution in an old exam:

$$\frac{p(1-p)}{1−(1−p)^2}=\frac{1-p}{2-p}$$

Without any further explanation. Could someone explain to me how to do this transition?

REPLY [4 votes]: By inspection (or by $(1-p)^2=1$), $p=0$ and $p=2$ are roots of the denominator. As the coefficient of the highest power is $-1$, it factors as $p(2-p)$. The rest is up to you.