Immovable Object+net interaction

the situation: 2 characters are flanking an enemy, and one player holds an action to cast Immovable Object on a net if an enemy is entangled in a net, and then player 2 uses an action to attack with a net and tangle the enemy up. assuming the second player hits with the net, what would be required of the caster? would they have to make a spell attack etc. if the player successfully casts the spell on the net and the enemy is trapped in an immoveable object net, what options would they have to escape?