justification of $\operatorname {E} \left[2X\operatorname {E} [X]\right] = 2\operatorname {E} [X]\operatorname {E} [X]$
Linearity of Expected value applys this.
let $a = \operatorname{E}[X]$, which is a constant
your formula is now $\operatorname{E} \left[ 2X a \right] = 2\operatorname{E}[X] a = 2\operatorname {E} [X]\operatorname {E} [X]$