Answer
See explanations.
Work Step by Step
Step 1. Using the figure given in the exercise, we can write a general form for the ellipse as $r=\frac{ep}{1-e\ cos\theta}$
Step 2. At $\theta=0$, we have $r(0)=\frac{ep}{1-e}$
Step 3. At $\theta=\pi$, we have $r(\pi)=\frac{ep}{1+e}$
Step 4. As $r(0)+r(\pi)=2a$, we have $\frac{ep}{1-e}+\frac{ep}{1+e}=2a$
Step 5. To solve for $p$, multiply both sides with $(1+e)(1-e)$. We have
$(e+e^2)p+(e-e^2)p=2a(1-e^2)$
or
$2ep=2a(1-e^2)$, thus $p=\frac{(1-e^2)a}{e}$
Step 6. The equation from Step-1 becomes $r=\frac{(1-e^2)a}{1-e\ cos\theta}$, which is the equation given in the exercise.