Tanner would have 7,015 pieces of candy, and his friend would get 2,806 pieces.
You’d divide the candy by 7 to get the seven parts, then multiply by two to calculate how much candy his friend got
9821/7= 1403 pieces of candy per part
1403•2= 2806 ~ how much his friend got
1403•5= 7016~ how much tanner had left