(i) The number of baskets must divide both 168 and 252, and we want the largest such number.
divisors(168)=[1,2,3,4,6,7,8,12,14,21,24,28,42,56,84,168]
divisors(252)=[1,2,3,4,6,7,9,12,14,18,21,28,36,42,63,84,126,252]
Going through the divisors of 168 and keeping those that also divide 252: common-divisors =[1,2,3,4,6,7,12,14,21,28,42,84]. Its rightmost entry is gcd(168,252)=84, so she makes 84 baskets.
(ii) Each basket gets 168÷84=2 mangoes and 252÷84=3 oranges.