Expression of $\hat{\beta}_1$ in term s of $\beta_1$ in simple linear regression I'm reading a pdf document about simple linear regression, and it gave an expression of the least square estimator $\hat{\beta}_1 = \beta_1 + \frac{\sum^n_{i=0} \epsilon_i (x_i - \bar{x})}{\sum^n_{i=0} (x_i - \bar{x})^2}$, but I'm confused on how they get to this answer.
I only know that $\hat{\beta}_1 = \frac{\sum^n_{i=0} y_i(x_i - \bar{x})}{\sum^n_{i=0} (x_i - \bar{x})^2} = \frac{\sum^n_{i=0} (\hat{y_i} + \epsilon_i)(x_i - \bar{x})}{\sum^n_{i=0} (x_i - \bar{x})^2}$. Does it mean $\beta_1 = \frac{\sum^n_{i=0} \hat{y_i}(x_i - \bar{x})}{\sum^n_{i=0} (x_i - \bar{x})^2}$? Why is that?

This is essentially an algebraic exercise.  Noting the $y_i = \beta_0 + \beta_1 x_i + \epsilon_i$ you then have:
$$\begin{align}
\sum_i y_i(x_i - \bar{x})
&= \sum_i (\beta_0 + \beta_1 x_i + \epsilon_i)(x_i - \bar{x}) \\[6pt]
&= \beta_0 \sum_i (x_i - \bar{x}) + \beta_1 \sum_i x_i (x_i - \bar{x}) + \sum_i \epsilon_i (x_i - \bar{x}) \\[6pt]
&= \beta_0 (n\bar{x} - n\bar{x}) + \beta_1 \Big( \sum_i x_i^2 - n \bar{x}^2 \Big) + \sum_i \epsilon_i (x_i - \bar{x}) \\[6pt]
&= \beta_1 \Big( \sum_i x_i^2 - 2 n \bar{x}^2 + n \bar{x}^2 \Big) + \sum_i \epsilon_i (x_i - \bar{x}) \\[6pt]
&= \beta_1 \sum_i ( x_i - \bar{x})^2 + \sum_i \epsilon_i (x_i - \bar{x}). \\[6pt]
\end{align}$$
Substituting into your initial expression for the estimated coefficient, you get:
$$\hat{\beta}_1
= \frac{\sum_i y_i(x_i - \bar{x})}{\sum_i ( x_i - \bar{x})^2}
= \beta_1 + \frac{\sum_i \epsilon_i (x_i - \bar{x})}{\sum_i ( x_i - \bar{x})^2}.$$
(Also, usually the convention is that you would have observations $i=1,...,n$, so I'm not sure why you're summing over $i=0,...,n$.  In my working I sum over the former range.)
