Answer

4 mm.

If the books are on the shelf with the spine out, then the front cover of Vol. 1 is against the back cover of Vol. 2 so the worm only eats through 2 covers and no pages.