They both start with 20 sweets. To get the total number of sweets that Jack has, you need to take away x because that is the amount that he gives to will. Jack then eats 5 of his sweets so you need to take away 5 from 20-x. you do not know the value of x, but you can take the 5 from the 20 to get 15. Therefore Jack has 15 - X sweets at the end.Will, however, gains the x number of sweets that Jack gives him, so you ADD x on to his initial 20. However, will then eats half of his sweets after Jack has given him the additional x, so you divide the total amount (20 + x) by 2.