$$\frac { x } { 1 - p } = \frac { 2 x + 1 } { 3 }$$
$p=\frac{1-x}{2x+1}$
$x\neq 0\text{ and }x\neq -\frac{1}{2}$
$x=-\frac{p-1}{2p+1}$
$p\neq -\frac{1}{2}\text{ and }p\neq 1$