Think of a power of ten as shifting the digits. For example, consider the decimal $7.8333333\ldots$. Here, taking $n = 2$ and $k = 1$ demonstrates that this is an eventually periodic decimal. $10^{2+1}x - 10^2x = 783.333\ldots - 78.333\ldots = 705$. Now, the interesting thing is that $705$ is an integer! So we have that $1000x - 100x = 705$. But $1000x - 100x = 900x$. So $900x = 705$, so $x = \frac{705}{900}$ and is therefore rational.
This happened because, magically, $10^{2+1}x-10^2x$ turned out to be a whole number. Was that a random coincidence? Or will it happen every time? (hint, hint).
As a general rule, when given a hint like this, try it out on a specific example, and see if you can spot how it's useful in that one case. Don't worry about the general case until you can do it for one specific number. Then see if you can prove that whatever tricks you used for that case always work.