While you have your Spellbook, you can spend 10 minutes studying Spells that you have written in it. You can replace ANY prepared Spell with another. Known Spells (from a subclass) cannot be replaced.