I don't get why the part boxed in red.

Note that X, Y and U are all random variables, how is $\displaystyle E(\beta_1 X|X) = \beta_1 X$ ?

Shouldn't it be $\displaystyle E(\beta_1 X|X) = \beta_1E(X|X)$ since $\displaystyle \beta_1$ is just a constant, then $\displaystyle E(X|X) = \sum_{i=1}^n x_i P(X=x_i|X=x_i) = \sum_{i=1}^n x_i since P(X=x_i|X=x_i) = 1$

Thus $\displaystyle E(\beta_1 X|X) = \beta_1 \left(\sum_{i=1}^n x_i\right) \neq \beta_1 X$