Okay so I have gotten down to
$$b=\beta + \frac{\sum_{i=1}^{n}x_i \varepsilon_i}{\sum_{i=1}^{n} x_i^2}$$
but I cannot figure out how to show that second term is $0$.
Okay so I have gotten down to
$$b=\beta + \frac{\sum_{i=1}^{n}x_i \varepsilon_i}{\sum_{i=1}^{n} x_i^2}$$
but I cannot figure out how to show that second term is $0$.
Use that the expectation of a constant times a random variable is the constant times the expectation of the random variable. From which it follows that you need only show that the numerator is zero. And then use that the expectation of a sum is the sum of the expectations, from which it follows that you need only show that each term in the numerator is zero. And then use (again) that the expectation of a constant times a random variable is equal to the constant times the expectation of the random variable to obtain that you need only show that the $\epsilon_i$ all have expectation zero. And this is the assumption underlying the use of least squares!
All this assumed that the $x_i$ are fixed. In settings where the $x_i$ are random, one first conditions on all of the $x_i$, so that the what is needed is that the conditional expectation of the $\epsilon_i$, given the $x_i$ are all zero. Which is the assumption underlying least squares when the $x_i$ are random.