Let the total amount of pages be t
t=30+1/8t+2/8t
now simplify
t=30+3/8t
5/8t=30
divide 30 by 5
1/8=6
now you know 1/8 of the book is 6 pages which means the whole book has 48 pages.
(2, 8), (2, 5)
Just subtract the numbers that aren't the same.
8 - 5 = 3
So the distance is 3.