Well, 18 apples per box, and you have 15 boxes, multiplying the two numbers lets you know there are 270 apples total.
(18 • 15 = 270)
Then, divide the number of apples by how many you need per pie.
(270 / 7 = 38.57)
So the bakers would be able to make about 38 pies with the boxes of apples they have.
(I hope this is correct as I just quickly did it on a post it)