If both expire ITM, your position will be netted-off against eachother.
The Options will be settled at Intrinsic Value.
Eg. You Shorted Tata Steel 400 PE and went long in 390 PE, if on expiry day Tata Steel closes on 385, your 400 PE will have Intrinsic Value of 15 and 390 PE will have Intrinsic Value of 5, this will be the settlement price.
ATM is equal to ITM, in this scenario your position will be netted-off against each other.
Yes, your margin requirements will increase for the last two days of the expiry. You can read this post for more details.