Answer
a. 225, b. 273
Work Step by Step
Given $\hat p=0.29, \hat q=1-\hat p=0.71 $
a. At a 90% confidence the critical z-value is $z_{\alpha/2}=1.65 $
With $E=0.05,$ the equation $E=z_{\alpha/2}\times\sqrt {\frac{\hat p\hat q}{n}}$
becomes $1.65\times\sqrt {\frac{0.29\times0.71}{n}}=0.05$
Thus $n=(\frac{1.65}{0.05})^2\times0.29\times0.71=224.2\approx225$ (round up to the next integer here)
b. With no estimate of the sample proportion, we use $\hat p=\hat q=0.5 $
With $E=0.05,$ the equation $E=z_{\alpha/2}\times\sqrt {\frac{\hat p\hat q}{n}}$
becomes $1.65\times\sqrt {\frac{0.5\times0.5}{n}}=0.05$
Thus $n=(\frac{1.65}{0.05})^2\times0.5\times0.5=272.25\approx273$ (round up to the next integer here)