Unfortunately, and perhaps rather inevitably, your little stint and subsequent unleashing of baked evil hasn't gone unnoticed, and Twilight Sparkle has since discovered your collaboration with Pinkie and reported it to the proper authorities - namely, your employer Princess Celestia. Despite all pleas, wit, and reason, you and Pinkie are to be sentenced by her personally. Thankfully, some of the batter escaped during the chaos and did much to help Ponyville with its local gingerbread spider outbreak, so your punishment has been reduced somewhat, but Princess Celestia has decided that the most appropriate punishment for you is not only a 5% pay cut (which is already pretty bad as it is) but also to help out the remaining group of Twilight's friends Fluttershy, Rainbow Dash and Twilight Sparkle in whatever capacity you can. You cannot envision anything more ironic and cruel, to work for such agents of chaos as these ponies.
First things first though, there's the matter of the cake itself. The recipe will be sealed away in a much safer location (and they don't come much safer than the moon), since it was in your defense a delicious cake, and too good to destroy. For your part in actually baking it and yet paradoxically nearly unleashing pure evil, you only get a slice if your common sense can prove it hasn't abandoned you entirely.
Which, naturally, has led you to be locked inside a small room with twenty-nine other ponies. Staff around Canterlot Castle, apparently, you realise.
Princess Celestia then pitches the problem to you. All of these ponies work around the castle in different jobs, such as cleaner, chef, royal back-rubber, tame cat-burglar etc. but for all their skills, they keep misplacing all the tools of their trade. This has caused no end of frustration, and so she's decided to deal with this sensibly and calmly: by locking you in a small soundproof, windowless room with the threat of job termination hanging over their heads. As you do.
Fortunately, she is not without a sense of fair play, and has managed to find all thirty items herself, but she's sealed them away randomly in thirty different boxes. They all have a picture of one of their tools, but the picture won't always correspond with what's inside.
Princess Celestia will then let one of you out at a time. That pony can then look through fifteen boxes each for their own tool, but they may not remove what's inside, mark the box in any way, pick up the boxes to check for weight, or communicate any clues to the other ponies: you're only allowed to open the box, look inside, then close it again. If all the ponies can find all their tools, then Princess Celestia will keep them on: otherwise, a castle this huge could definitely never have too many interns - she could do with a new secretary to the brigadier.
This royally sucks, most of the ponies conclude - by picking fifteen of the thirty boxes randomly, they only have a 50:50 chance of finding their precious item, and multiply those odds among thirty ponies, and for all thirty of you? An astronomically low 1/1073741824 chance.
As impressive as the fact was that you managed all that in your head, they don't seem any closer to being able to find their things. It now falls to you to ensure that you and the other ponies get to keep their jobs and that you survive to carry out the rest of your punishment: more life-and-death situations in a small country town, helping out three simple ponies. The horror. So what's the plan, chuckles?
Ted-Ed again. I approve.
Ask them to search the box that has the picture of their trade.
If it is the right item, stop.
If it's not, look in box that has that picture on it.
For example, the guard would first look in the box that has a picture of his spear.
He finds a rake.
He then looks inside the box with a rake picture.
It continues until he either finds his spear, or he opens fifteen boxes.
Whichever happens first.
9347866
Nah, that one's a pretty old chestnut. Almost every site I visited had this puzzle, except with 100 prisoners.
9347891
Ted-Ed is the first time I saw it.
Theirs was 10 band members.
Open the boxes halfway. 30 halves is 15 wholes.
In all seriousness though, I am enjoying this series of puzzles. Good work
9347904
Ted-Ed does have a lot of good ones. I doubt many of them are original though, usually just updated to be a bit more appealing or relatable. But then again, that's the point of series like those and this. Bring old puzzles that require some cleverness or critical thinking to new people. It's fun to see different people find new ways to teach a person, "Two wrongs don't make a right, but three lefts do!"
I feel like this puzzle is like the hats one in the first adventure, and I think it might be solved in the same way.
Open a box, wait a minute.
Repeat until you hit 15 or your tool.
Then if they come back after 4 minutes every one knows it's in box 4.