When you get to the cog, enable the "Elemental Bomerangs" code, then break the ice. Before the water freezes back, switch to the Frostyrang and shoot them at the water. They will make little ice floes for you to stand on. Keep doing this until you get to the cog.