If i'm correct the answer would 12m=30, hope i was able to help out.
So that would be the total bill divided by 4
17.84/4=16/4+1/4+0.84/4=4+0.25+0.21=4.46
each person's share was $4.46
three, twelve, five, and six
H + m = 480
h = 2m
2m + m = 480
3m = 480
m = 480/3
m = 160 <=== there were 160 math books
h = 2m
h = 2(160)
h = 320 <=== there were 320 history books