I want to prove that:
$$\mathbb{V}(X)=\mathbb{E}[(X-\mathbb{E}[X])^2]=\mathbb{E}[X^2]-\mathbb{E}[X]^2$$
Here's my attempt:
\begin{equation} \label{eq1} \begin{split} \mathbb{V}(X) & =\mathbb{E}[(X-\mathbb{E}[X])^2] \\ & = \mathbb{E}[(X-\mathbb{E}[X])(X-\mathbb{E}[X])] \\ & = \mathbb{E}[X^2-X\mathbb{E}[X]-X\mathbb{E}[X]+\mathbb{E}[X]^2] \\ & = \mathbb{E}[X^2] - \mathbb{E}[2X \mathbb{E}[X]] + \mathbb{E}[\mathbb{E}[X]^2] \end{split} \end{equation}
From this step onwards, I got a bit confused. I assume that the expected value of an expected value of a random variable is the same as the expected value of a random variable, i.e. $\mathbb{E}[\mathbb{E}[X]] = \mathbb{E}[X]$. So I'd get:
\begin{equation} \label{eq2} \begin{split} \mathbb{V}(X) & =\mathbb{E}[(X-\mathbb{E}[X])^2] \\ & = \mathbb{E}[(X-\mathbb{E}[X])(X-\mathbb{E}[X])] \\ & = \mathbb{E}[X^2-X\mathbb{E}[X]-X\mathbb{E}[X]+\mathbb{E}[X]^2] \\ & = \mathbb{E}[X^2] - \mathbb{E}[2X \mathbb{E}[X]] + \mathbb{E}[\mathbb{E}[X]^2] \\ & = \mathbb{E}[X^2] - 2\mathbb{E}[X \mathbb{E}[X]] + \mathbb{E}[X]^2 \end{split} \end{equation}
But now how do I deal with the middle term? How can I simplify $2\mathbb{E}[X \mathbb{E}[X]]$?
Since $\mathbb{E}[X]$ is a constant - call it $\mu$ - you have $\mathbb{E}[\mu X]=\mu \mathbb{E}[X]=\mu^2=\mathbb{E}[X]^2$.