I came across this equation in the solution to problem 35 of "50 Challenging Problems in Probability" (page 37), which deals with a variant of the gambler's ruin problem. Specifically:
A man is 1 step away from falling off a cliff. He takes random steps either towards or away from the cliff. If the probability of his takinng a step away is always 2/3, and of taking a step towards always 1/3, what is his chance of escaping the cliff?
The book gives the answer as $(x-1)(px + p - 1) = 0$, but I can't figure out how to arrive at that answer using standard factoring methods or the quadratic equation. How do I factor this polynomial?