Answer
385 and 601
Work Step by Step
At a 95% confidence the critical z-value is $z_{\alpha/2}=1.96 $
With $E=0.04, \hat p=\frac{40}{200}=0.20, \hat q=1-\hat p=0.80$
The equation $E=z_{\alpha/2}\times\sqrt {\frac{\hat p\hat q}{n}}$
becomes $1.96\times\sqrt {\frac{0.2\times0.8}{n}}=0.04$
Thus, $n=(\frac{1.96}{0.04})^2\times0.2\times0.8=384.16\approx385$ (round up to the next integer here)
With $E=0.04, $ and no estimate of the sample proportion,
we use $\hat p= \hat q=0.5$
The equation $E=z_{\alpha/2}\times\sqrt {\frac{\hat p\hat q}{n}}$
becomes $1.96\times\sqrt {\frac{0.5\times0.5}{n}}=0.04$
Thus, $n=(\frac{1.96}{0.04})^2\times0.5\times0.5=600.25\approx601$ (round up to the next integer here)