Total number of books is obviously 9+6 = 15
Let m = #of math books and r=# of reading books. Then m+r=15, where m and r are integers greater than zero.
Consider "9 math books" and "6 reading books." The ratio of m to r is 9/6,
or 3/2.
9 math books and 6 reading books could go on ONE shelf with no books left over. But we wanted to determine the greatest number of bookshelves Andy could use.
TWO shelves would be inappropriate, since we'd have to divide both 9 and 6 by 2, and we'd end up with fractional books. No good.
THREE shelves would work. We'd have to divide both 9 and 6 by 3,
which would signify 3 math books and 2 reading books on each of THREE shelves.
Four, five and six shelves would not work. Can you explain why?