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.
Try glucose (C6H1206) and water (H2O)?
You can also multiply the decimals by a multiple of 10 to turn them I to whole numbers. Just make sure you multiply them both by the same multiple of 10 and divide them back before you write your answer!