Answer
$r=\frac{ep}{1+e\cos\theta}$
Work Step by Step
We know that $d(F,P)=e\cdot d(D,P)$ and that $d(D,P)=p-r\cos\theta$.
Hence,
$r=e\cdot(p-r\cos\theta)\\r=ep-er\cos\theta\\r+er\cos\theta=ep\\r(1+e\cos\theta)=ep\\r=\frac{ep}{1+e\cos\theta}$