If we assume that $f$ is absolutely continuous, we have (assuming $h > 0$ for convenience, the quantity is evidently the same for $h$ and $-h$)
$$\begin{align}
\int_0^h \lvert f(x+h)-f(x)\rvert\,dx &= \int_0^h \left\lvert \int_x^{x+h} f'(t)\,dt\right\rvert\,dx\\
&\leqslant \int_0^h\int_x^{x+h}\lvert f'(t)\rvert\,dt\,dx\\
&= \int_0^{h}\left(\int_0^t\,dx\right)\lvert f'(t)\rvert\,dt + \int_h^{2h}\left(\int_{t-h}^h\,dx\right) \lvert f'(x)\rvert\,dt\\
&= \int_0^h t\lvert f'(t)\rvert\,dt + \int_h^{2h} (2h-t)\lvert f'(t)\rvert\,dt
\end{align}$$
and analogously, with slightly more cumbersome notation,
$$\int_{nh}^{(n+1)h} \lvert f(x+h)-f(x)\rvert\,dx = \int_{nh}^{(n+1)h}(t-nh)\lvert f'(t)\rvert\,dt + \int_{(n+1)h}^{(n+2)h} \bigl((n+2)h-t\bigr)\lvert f'(t)\rvert\,dt.$$
Now adding all these integrals together telescopes and gives
$$\begin{align}
\int_\mathbb{R} \lvert f(x+h)-f(x)\rvert\,dx &\leqslant \sum_{n\in\mathbb{Z}} \int_{nh}^{(n+1)h} \left(\bigl((n+1)h-t\bigr) + (t-nh)\right)\lvert f'(t)\rvert\,dt\\
&= h\int_\mathbb{R} \lvert f'(t)\rvert\,dt\\
&= h\cdot A.
\end{align}$$
Now do something similar without the assumption of absolute continuity. Using
$$\lvert f(x+h)-f(x)\rvert \leqslant \lvert f((n+1)h) - f(x)\rvert + \lvert f(x+h)-f((n+1)h)\rvert$$
for $nh \leqslant x \leqslant (n+1)h$ looks like a good idea.
(Yes, sure, for absolutely continuous $f$, it would have been simpler to obtain the result by directly changing the order of integration in
$$\int_\mathbb{R} \int_x^{x+h} \lvert f'(t)\rvert\,dt\,dx,$$
but for the case without absolute continuity, it is probably easier to see this way.)