Z=2.5758 corresponds to 99% confidence interval. The significance level of 1-0.99=0.01 has to be halved (0.005) when looking up the Z score because we are looking for the interval between the two tails of the normal distribution, so it’s the Z score for 99.5%.
Sample size n=525, p (proportion of voters)=336/525=0.64.
(a) Confidence interval=
0.64±2.5758√(0.64×0.36/525)=0.64±0.054.
Confidence Interval for p=[0.586,0.694], and (b) the margin of error is 0.054.
(If we multiply the interval by 525 we get the CI in terms of voter numbers=[308,364] approx.)
This is based on the adjusted standard deviation s and extreme values of the proportion p that would allow for 2.5758 standard deviations from the sample proportion (treated as the mean). If L is the low end of the interval and H is the high end:
(L-p)/s=-2.5758 and (H-p)/s=2.5758.
Sample variance=s²=p(1-p)/n.