Inscriptio Labyrinthica
J, 27 bytes

([{~]+/&amp;(|@i:)#@[-1+])-:@&lt;:


Try it online!

An example will clarify the high-level approach.

Consider 'ABCDE' f 3

We notice that what we seek is simply the "cross addition" table of 1 0 1 and 3 2 1 0 1 2 3, which looks like this:

4 3 2 1 2 3 4
3 2 1 0 1 2 3
4 3 2 1 2 3 4


We then pull those indexes from the original string: [{~.

All the rest of the code is just boring arithmetic and the use of i: to construct the arguments 1 0 1 and 3 2 1 0 1 2 3.