Get the staff to the forge.
Talk to the Elementals that were trapped inside and get a summoning stone (looks a bit like an ice shard).
Get back to the witch and use the summoning stone so that the fire elemental can use his flamethrower on the ice that traps her.
If you don't care for the XP, you can just as well finish the game without freeing her or visiting Hilberheim at all.