Hello iamstupid,
This is a very good question. However, I am not allowed to do the work for you (forum rules, sorry).
The intention of the forum is to help provide guidance to you. Could you start the problem (give it your best try) and provide an explanation of why you did the step (as an example, X + Y = 100, meaning X is the value of the pages in the chapters of a book, and Y = the number of pages in the index. These two are to add up to 100.)
Thanks for your help.
Sincerely,
Eugene