Problem 1

a. Hannah has invited 14 friends and including herself, there are 15 children. Each child needs 3 cakes, so they need a total of 15 * 3 = 45 cakes. Since there are 6 cakes in a packet, they need to buy 45 / 6 = 7.5 packets. Since they can't buy half a packet, they need to buy 8 packets of cakes.

b. Each child needs a small bag of sweets, so they need 15 bags of sweets. Since there are 5 small packets of sweets in one large packet, they need to buy 15 / 5 = 3 large packets of sweets.

c. The cost of the cakes is 8 * £2.99 = £23.92 and the cost of the sweets is 3 * £2.89 = £8.67. So, they will spend a total of £23.92 + £8.67 = £32.59.

d. Hannah's mum pays with two £20 notes, which is a total of £40. The change she gets is £40 - £32.59 = £7.41.

Problem 2

a. There are 34 children in the class and each child needs 2 pencils, so they need a total of 34 * 2 = 68 pencils. Since pencils come in packs of 6, they need to buy 68 / 6 = 11.33 packs. Since they can't buy a fraction of a pack, they need to buy 12 packs of pencils. There will be 12 * 6 - 68 = 4 pencils left over.

b. The cost of the pencils is 12 * £1.99 = £23.88. If John is given £30 to spend, the change he will get is £30 - £23.88 = £6.12.