Is this $\beta$-reduction step incorrect or not?

Solution 1:

You're rightfully nitpicking here and the author in your reference described this edge case of $\beta$ conversion a little confusingly than necessary. You just need to follow rule 5 in one of your earlier post. Your above $\alpha$ conversion step is necessary since rule 5 doesn't apply ($y$ is obviously free in $N=y$!). So there's another rule which appears as the last rule of capture-avoiding substitution of $N$ for free occurrences of $x$ right under your quote in your reference.