A random sample of $n=484$ voters in a community produced $x=257$ voters in favor of candidate A. Compute the sample variance.

I have the solution but I don't follow some of the steps in it.

$$
\begin{align}
s^2&=\frac{1}{483} \cdot \sum\_{i=1}^{484}(X\_i-\bar X)^2\tag1\\
&=\frac{1}{483} \left[ 257\left(1-\frac{257}{484}\right)^2 + (484-257)\left(0-\frac{257}{484}\right)^2\right]\tag2\\
&=\frac{1}{483}\cdot48\cdot\frac{257}{484}\cdot\left(1-\frac{257}{484}\right)\tag3
\end{align}
$$

I have no idea how to get from equation 1 to equation 2.

Going from equation 1 I get...

$$
\begin{align}
\frac{1}{483} \left(\sum\_{i=1}^{484}X\_i^2-484\left(\frac{257}{484}\right)^2\right)\tag4\\
\frac{1}{483} \left(\sum\_{i=1}^{484}X\_i^2-\frac{257^2}{484}\right)\tag5
\end{align}
$$

I don't know what to do with $\sum\_{i=1}^{484}X\_i^2$

I had an idea that the problem should use the Binomial variance $np(1-p)$ but nothing in equation 2 looks like that to me so I'm just entirely lost.

Edit: I noticed that I erroneously excluded parenthesis around the factor in my eq 4 and 5 which I've since added in which, of course, made all the difference.