
Explanation
There are 7 choices for the first slot, then 6 choices for the next, and so on. Count down until reaching 1. Multiply along the way.
7*6*5*4*3*2*1 = 5040 different ways to arrange the 7 books.
Only one of those permutations will be the correct order.
That's how we arrive at 1/5040
This approximates to roughly 1/5040 = 0.000198 = 0.0198%