Hi,
Instant OS will sit in the backup partition :).
IAPs will have 2 partitions, backup and primary partition, when you factory reset it image from the backup partition will be copied in to primary. when you convert an IAP in to either CAP or RAP, controller will update only the primary partition hence the backup partition will be untouched.
Hope you got some more clarity on this.