How was this factoring of $1-2x-x^2$ achieved? If I factor $1-2x-x^2$ using the quadratic formula I get
$$x=\frac{2\pm \sqrt{4-4(-1)(1)}}{2(-1)}$$
$$x=\frac{2\pm \sqrt{8}}{-2}$$
$$x=-1 \pm \sqrt{2}$$
Let $\alpha = -1 +\sqrt{2}$ and $\beta=-1-\sqrt{2}$. 
So $1-2x-x^2=-(x-\alpha)(x-\beta)$.
In the image below, where did $1-\alpha x$ and $1-\beta x$ come from?



Note that: $\frac{1+x}{1-2x-x^2}=\frac{-(1+x)}{(\alpha-x)(\beta-x)}$ with $\alpha$ and $\beta$ as you have them in your quadratic formula part. Using partial fractions, we then get: $$=\frac{\frac{1}{2}}{\alpha-x}+\frac{\frac{1}{2}}{\beta-x}=\frac{\frac{1}{2}}{\frac{1}{\alpha}(1-\alpha x)}+\frac{\frac{1}{2}}{\frac{1}{\beta}(1-\beta x)}$$ Then simplifying yields what you want.
