$$\begin{align}\frac{1-r(e^{ix}+e^{-ix})/2}{(r-e^{ix})(r-e^{-ix})}&=\frac{A}{r-e^{ix}}+\frac{B}{r-e^{-ix}}\\\\\end{align}$$
$$=1-r(\dfrac{e^{ix}+e^{-ix}}{2})=A(r-e^{-ix})+B(r-e^{ix})$$
I have received the instruction here (see J.G.'s reply) that I should consider the "$r^0$ and $r^1$" terms. I don't understand this, so he wanted me to set $r^0=1$ and $r^1=r$?
The end result is two equations: $1=-e^{-ix}A-e^{ix}B$ and $-\dfrac{(e^{ix}+e^{-ix})}{2}=A+B$
How do you obtain this system of equations?
Please don't use concepts in complex analysis, I have only studied partially Calculus 2.