How does White get out of this one?

My opponent (white) pulled two brilliant moves after this. Can you figure it out?

My opponent (white) pulled two brilliant moves after this. Can you figure it out?