Assuming
NO Robe of Vecna and Amulet of Power.
Assuming Monk is level 40, and Mage/Sorcerer is level 31( 8,000,000 Xp).
Contingency: Stoneskin cast on self when enemy sighted
Chain Contingency: Protection from Magical Weapons, Mislead and True Sight cast on self when enemy sighted
Cast Time-Stop when fight starts, Monk cannot hit the Sorcerer to disrupt spellcasting, since he is protected by Stoneskin and PfMW( Contingencies will trigger).
During Time-Stop, cast Imprisonment on Monk.
If Monk used Protection from Magic scroll, then just stay invisible for 10 turns( 10 minutes), just remember to recast PfMW when the time runs out.
Monk cannot go invisible, True Sight takes care of that.