This is from Discrete Mathematics and its Applications
Here's my book section on shift ciphers.
I understand the idea behind this. If you were trying to encrypt say a single letter 'b' with a shift cipher of key 8, you would do it by first representing 'b' as an integer, 1 because it is 1 away from 'a', and then applying the encryption formula(shift cipher)
f(p) = (p + 8) mod 26 $\quad$= (1 + 8) mod 26 = 9.
Once you have the number 9, you revert that back to letter form, which in this case is 9 away from 'a' or 'j'.
In this problem you aren't given the key cipher though. How would you go about finding the shift cipher key?