Let $X\sim\text{Bin}(n,p)$. if $n = 100$ and $\hat p = X/n = 0.8$, if we want the length of the $95\%$ CI for $p\leq 0.03$, we need at least what $n$? 
(b) (2 points). Let $X\sim\operatorname{Bin}(n,p)$. If $n = 100$ and $\hat p = X/n = 0.8$, then the $95\%$ confidence interval for $p$ is _______. If we want the length of the $95\%$ confidence interval for $p$ to be less than or equal to $0.03$, we need $n$ at least ________.

My Work:
a) $0.8 \pm 1.96\sqrt{\frac{(0.8)(0.2)}{100}} = 0.8\pm 0.0784 =(0.7216, 0.8784)$ (This is correct.)
b) $\frac{(2)(1.96)(0.4)}{\sqrt n}\leq \frac{3}{100}$
$n = 2731.1076$
but the answer for this part is $4269$. 
Need help with the second part
 A: Half the length of the CI is the margin of error $M = 1.96\sqrt{\frac{.8(.2)}{n}}.$ So you want to set $2M = .03$ and solve for $n$. This gives the same
answer you got.
It seems the text is taking a conservative approach. The longest possible CI
results if $p = 1/2.$ So ignoring the current evidence that $p \approx .8,$ 
the author goes for the worst-case scenario and uses 
$M = 1.96\sqrt{\frac{.5(.5)}{n}}.$ Using that, I get 4268.444, and
rounding up to the next larger integer I get 4269. That would ensure that
even the longest possible CI is still as short as .03.
Of course, there is no guarantee that we won't get $p \approx .5$ on the
next survey and need such a large sample. But given the statement of the
problem, I can see why you worked it as you did. You should have another
look at the discussion on lengths of CIs in your text to get a better view of the
author's recommendations for finding sample sizes.
Notes: (1) To see that $p = 1/2$ gives the largest possible value
of $p(1-p)$ under the square root sign, notice that $y = p(1-p)$ is
an inverted parabola with its maximum at $p = 1/2.$
(2) In practice a polling or market research company would probably set
a trial $n \approx 2800.$ Then see if the CI is sufficiently short with that many observations. If not,
revise to $n \approx 4200$ or $4300$ and continue taking data. I worked
briefly for an advertising firm that did market research, and that is the
sort of procedure they followed. (It was a fine job and they're still in business
decades later, but I preferred medical and governmental applications, and teaching.)
