The ratio of history to math is given by
which is equal to
Then, the answer for the history to math is 2:3 or, in fraction form is
On the other hand the ratio history to science is 28:35, which in fraction form is written as
Similarly, the ratio math to science is 42:35, which in fraction form is
Now, if we add 1 science book and 2 math book, we have 36 science books and 37 math books, then the ratio history to math is 28:37, which in fraction form is written as
and the ratio history to science is 28:36. which in fraction form is written as
and the ratio math to science is 37:36, which in fraction form is written as