
I don't get where the + 99...9dk + part comes from especially.

I don't get where the + 99...9dk + part comes from especially.
$10^k=10000...0=9999999...9+1$
thus
$$10^kd_k=(9999999...9+1)d_k=999...9d_k+d_k \,.$$
Look at an example and maybe it becomes clear:
$$2000 = 2\cdot 1000 = 2\cdot(1+999) = 2+2\cdot 999$$
He is just saying that $$10^k=(10^k-1)+1=(999\ldots 9)+1$$ For example, $10^3=999+1$. He is also factoring out $d_k$ in this step.