Dropping weapons to cast immediate spell with somatic components

While holding a quarterstaff, can you cast an immediate action spell with somatic components (such as Saving Finale) while ending his turn holding the staff in two hands?

I have a player that claims that you’re able to, the logic being that you can switch to from a two-handed to holding it in one hand as a free action and you can take "one or more free actions while taking another action normally" according to D20pfsrd and switching from a two-handed to a one-handed stance is a free action according to FAQ.

The logic behind not being able to do it is that you’re not able to begin casting the spell if you don’t have a free hand.