You have to find a common factor (preferably the greatest one):
The GCF of 84 and 56 is 28 so harry can make 28 gift bags, now to figure out how many candies go in each bag:
84/28=3
56/28=2
3 chocolates and 2 peppermints go in each bag.
Hope this helps :)