After he destroys the Ring, of course.
You can’t just eject the warp core and hope a matter/antimatter explosion will produce a shock wave that let’s you surf out of the event horizon. That’s stupid. Find a more down-to-Earth solution to problems for your story.
I think, unless one is Disney, “once your ship crosses the Event Horizon, the story is over” should be a writing metaphor.
Unless, well, one is writing pure fantasy, in which case people can just Dance The Magic Dance and they’re out of the black hole and sipping mint juleps with Doctor McCoy and Frodo Baggins.