Boots are usually made for walking but in this game, with your jump you can transform the castle objects with your boots. The soldier needs to collect the key to escape from this room. And it can only happen when he will collect the key and open the door to escape. Try to jump when you think you can hop to the upper wood.