Artoomis, not to question your understanding of the rules, but
1. Rogue declares a readied action to strike when the wizard cast his spell.
2. Wizard backs off to cast spell.
3. This is a question, if the wizard backs off only 5 feet, then no AoO from the rogue, if the Wizard backs off more then 5 feet, then the rogue does get his AoO.
4. Wizard starts to cast a spell.
5. Readied action kicks in, but what was the readied action, to attack the wizard. Unless the rogue has a ranged weapon or a weapon with reach, he will be unable to do his readied action. Now, my understanding was any partial action can be readied with a readied action, so the rogue, if he was expecting the wizard to back up and cast, he could have readied a partial charge to attack the wizard, if so, he could then leap and attack. However, what if the wizard never moved and cast instead on the defensive, the rogue decided to partial charge the wizard if he started to cast, well, he is in melee with the wizard so he can't charge and thus receives no extra attacks on the wizard.
6. Resolve spell.
Now, I could very well be wrong, but I believe this is the set of actions to take.
1. Rogue readies a partial charge when Wizard begins to cast a spell.
2. Wizard backs off 5 feet, not provoking an attack of opportunity.
3. Wizard starts to cast spell.
4. Readied action of the rogue happens, partial charge against the wizard.
5. Resolve spell.
Someone please correct me