Number of M&M bags with Danielle = 24
Number of jelly beans with her = 36
Number of snickers with her = 48
To find the highest number of candies each friend of Danielle will get, in a way in which all of them have the same number of candies , we have to find the HCF (highest common factor) of all the varieties of candy with Danielle.
Factors of 24 = 1,2,3,4,6,8,12,24
Factors of 36 = 1,2,3,4,6,9,12,18,36
Factors of 48 = 1,2,3,4,6,8,12,16,24,48
Highest common factor = 12
Which means the highest number of friends Danille can invite is 12 .
Number of M&M bags each friend will get :-


Which means each friend will get 2 M&M bags .
Number of jelly beans each friend of hers will get :-


Which means each friend of Danielle will get 3 jelly beans.
Number of snickers each friend of hers will get :-


Which means each friend of hers will get 4 snickers .
Therefore , the highest number of friends Danielle can invite = 12 and each of her friends will get 2 M&M bags , 3 jelly beans and 4 snickers .