The model is
$$y_t = \beta +u_t,\;\; u_t\sim N(0, \sigma^2),\; t=1,...,n$$
and the sample is independent. The estimator is
$$\hat \beta = \frac1n\sum_{t=1}^n y_t = \frac1n\sum_{t=1}^n (\beta +u_t) = \beta + \frac1n\sum_{t=1}^n u_t$$
If $\beta = \beta_1$ (where $\beta_1$ is some value different than the $\beta_0$ we set as the null hypothesis), then the authors set $\frac1n\sum_{t=1}^n u_t \equiv \hat \gamma$ and so they write that under the alternative we have
$$\hat \beta = \beta_1 +\hat \gamma$$
Since the $u'$ are i.i.d normal their sum/average is also normal. Then the distribution of the estimator is
$$\hat \beta \sim N(\beta, \sigma^2/n)$$
Assume we set as our null hypothesis that $H_0:\beta = \beta_0$. and the alternative $H_1:\beta \neq \beta_0$.
Then we form the statistic (which is a function of the estimator, not the estimator itself)
$$z = \frac{\hat \beta - \beta_0}{\sigma/ \sqrt{n}}$$
The distribution of this statistic is (before specifying any hypothesis to test)
$$z \sim N\left(\frac{\beta - \beta_0}{\sigma /\sqrt{n}},1\right)$$
Assume that we pose as our null hypothesis that $H_0: \beta = \beta_0$. Then if the null hypothesis is true we get
$$z|_{H_0} \sim N\left(0,1\right)$$
If the alternative is true then we substitute for $\hat \beta$ to get
$$z|_{H_1} = \frac{\beta_1 +\hat \gamma - \beta_0}{\sigma /\sqrt{n}} = \frac{\beta_1 - \beta_0}{\sigma \sqrt{n}}+\frac{\hat \gamma }{\sigma /\sqrt{n}}$$
The first term is a constant, the second term is a standard normal r.v. (remember what $\hat \gamma$ stands for). So the distribution of the statistic under the alternative is
$$z|_{H_1} \sim N\left(\frac{\beta_1 - \beta_0}{\sigma /\sqrt{n}},1\right)$$
and the authors write
$$\lambda \equiv \frac{\beta_1 - \beta_0}{\sigma /\sqrt{n}}$$