All together there are 48 + 30 books, which comes out to 78 books. All discount packages contain the same number of books.
Think of the products of integers equal to 48: 3*16, 4*12, 6*8. Are there more?
Think of the products of integers equal to 30: 3*10, 5*6, 2*15. Are there more?
Think what these sets of factors have in common: there could be 8 packages of 6 science books (48 books total); there could be 5 packages of 6 mysteries (30 total). Doing this, we ensure that every package has the same number of books (6). We can make (8+5), or 13, packages.
Check: Does (6 books/package)(13 packages) = 78 books? YES.