Activating the red and blue switch palaces beforehand will help you out a little bit here. Watch the timing of the spikes and be ready to sprint, jump, or duck in a split-second. Near the end, you can safely spin jump on top of the fire circling the platforms.