The basic idea is that we get two expressions for $\Delta \Pi = ...$ and equate them.
The thing that does not make sense is that in one we take into account the dividend
$$\Delta \Pi = \frac{d}{dS}V \cdot \Delta S -1 \cdot \Delta V \boxed{+ (D \cdot \Delta t) \cdot \frac{d}{dS}V \cdot S}$$
where as in the other we totally ignore it
$$\Delta \Pi = \Pi \cdot k$$ $$\Delta \Pi = \bigg(\frac{d}{dS}V \cdot S -1 \cdot V \bigg) \cdot \bigg(r \cdot \Delta t \bigg)$$
How come?