Prove that there exists two consecutive natural numbers such that sum of all digits of each number is multiple of $2017$.

Let $\Sigma_n$ be the sum of the decimal digits of $n$. Then

$$\Sigma_{n+1}=\Sigma_{n}+1-9T_n$$ where $T_n$ is the number of trailing nines (because cascaded carries replace all trailing nines by zeroes).

The smallest solution of $9T_n-1=2017k$ is indeed $T_n=1793$ and you can't avoid all these nines.

As the sum of these digits is $1\mod 2017$, a total of $2016=9\cdot224$ is missing. You can't just preprend these $224$ nines, because more carries would result. It suffices to split the last nine to avoid that, and the best way is by moving one unit ahead.

The smalles pair is thus

$$1\underbrace{9\dots 9}_{223}8\underbrace{9\dots 9}_{1793}\to9\cdot2017$$

$$1\underbrace{9\dots 9}_{223}9\underbrace{0\dots 0}_{1793}\to1\cdot2017$$


From your example, I got the following :

$$\underbrace{9\dots 9}_{223}18\underbrace{9\dots 9}_{1793}$$

$$\underbrace{9\dots 9}_{223}19\underbrace{0\dots 0}_{1793}$$

I got a smaller one in the similar way as above :

$$\underbrace{9\dots 9}_{222}297\underbrace{9\dots 9}_{1793}$$

$$\underbrace{9\dots 9}_{222}298\underbrace{0\dots 0}_{1793}$$