In deriving the unbiasedness of OLS Estimators,
$$\hat{\beta_1} = \beta_1 + \frac {\sum_{i=1}^{n} (x_i - \bar{x})u_i}{\sum_{i=1}^n (x_i - \bar{x})^2}$$
My professor changes the above to:
$$\hat{\beta_1} = \beta_1 + \sum_{i=1}^{n} (\frac {(x_i - \bar{x})}{\sum_{i=1}^n (x_i - \bar{x})^2})u_i$$
How are these two equal?