Stochastic AK model derivation
I think you may substitute it directly as mentioned?
$$v(A,k) = \max log(c) + \beta E[v(A',k')|A]$$
Applying the value function expression (note period change):
$v(A',k') = \frac{log(k')}{1-\beta} + v(A',1)$
Substituting:
$$v(A,k) = \max log(c) + \beta E\left[\frac{log(k')}{1-\beta} + v(A',1)|A\right]$$
By linearity:
$$v(A,k) = \max log(c) + \beta E\left[\frac{log(k')}{1-\beta}|A\right] + E\left[v(A',1)|A\right]$$
Since $E\left[v(A',1)|A\right] = D(A)$:
$$v(A,k) = \max log(c) + \beta \frac{log(k')}{1-\beta} + \beta D(A)$$