This was given as part of the answer of a more complex problem:
$$\sum_{n=1}^{\infty}\sum_{i=nr}^{\infty}f(i)=\sum_{i=r}^{\infty}\sum_{n=1}^{\left\lfloor \frac{i}{r}\right\rfloor}f(i)=\sum_{i=r}^{\infty}\left\lfloor\frac{i}{r}\right\rfloor f(i)$$
But I don't understand how the above follows.
So I expanded the first expression $$\sum_{n=1}^{\infty}\sum_{i=nr}^{\infty}f(i)=\sum_{n=1}^{\infty}f(nr)+f(nr+1)+\dots$$
$$=\big(f(r)+f(r+1)+\dots\big)+\big(f(2r)+f(2r+1)+\dots\big)+\dots$$
And don't see how I can continue here.
How is the floor function related to the above expression?

Lets start from where you were lost: \begin{align} \sum_{n=1}^{\infty}\sum_{i=nr}^{\infty} f(i) = \underset{n=1}{\underbrace{f(r)+f(r+1)+\ldots}} + \underset{n=2}{\underbrace{f(2r)+f(2r+1)+\ldots}} + \underset{n=3}{\underbrace{f(3r)+f(3r+1)+\ldots}} +\ldots. \end{align} Clearly, $f(r),f(r+1),\ldots,f(2r-1)$ appears only once in the summation, as those terms appear only when $n=1$, and not for other values of $n$. $f(2r),f(2r+1),\ldots,f(3r-1)$ appears only twice in the summation, as those terms appear only when $n=1,2$, and not for other values of $n$.
More generally, $f(nr),f(nr+1),\ldots,f((n+1)r-1)$ appears $n$ times in the summation. Therefore, $f(i)$ appears $\lfloor\frac{i}{r}\rfloor$ times as $\lfloor\frac{nr}{r}\rfloor=\lfloor\frac{nr+1}{r}\rfloor=\ldots=\lfloor\frac{(n+1)r-1}{r}\rfloor=n$.
Hence,
\begin{equation} \sum_{n=1}^{\infty}\sum_{i=nr}^{\infty} f(i) =\sum_{i=r}^{\infty} \lfloor\frac{i}{r}\rfloor f(i). \end{equation}