Alrighty then! First, lets put all focus on group 1. Group 2 is kinda irrelevant right now, but it'll be in good use soon!.
There are 36 items in category A for group 1There are 12 items in category B for group 1
Overall, there will be 48 items for group 1
We divide each one by the total A: 36/48 = 0.75B: 12/48 = 0.25
In conclusion, input the answer on top as 0.75The answer that goes in the box down below is 0.25
Hope it helps!
~Samuel