What is the optimal escape trajectory from near a black hole?
I'd like to know a little more about the geometry of the ship's trajectory. I would be asking for clarification in comments but I don't know how to put images in comments.

A good distance away the ship is moving nearly a straight line with regard to the large mass. As the ship gets closer the path gradually bends towards the large mass. If you're still a fair distance from the star, the path can be fairly well modeled with Newtonian mechanics and the curving path can be modeled as a hyperbola. The straight line the hyperbola is gradually deviating from is called an asymptote:



This illustration (page 36 of my coloring book) is a hyperbola about the earth, but it could also be a hyperbola about a larger mass.

Escape velocity climbs as you get closer to the mass. The hyperbola's speed is sqrt(Vescape^2 + Vinf^2). I use this right triangle and the Pythagorean theorem as a memory device:



If you did a burn in the opposite direction from your Vinf vector, it could reduce your Vinf and drop you even closer to the mass.

If your burn vector is at right angles to your velocity vector, it would increase your vinf (and thus raise point of closest approach aka periapsis). It would also change the direction of the hyperbola's asymptote.

To better answer your question, I'd need to know more about the geometry of this scenario, what Vesc and Vinf is and how much delta V the ship was capable of. It would be helpful to know at what distance our heroes discover they're in trouble.

If the ship has already fallen close enough that it's traveling an appreciable fraction of c, the above doesn't apply. Conics from Newtonian mechanics is a good approximation until you get too close to the black hole. Then you'd need general relativity to model the trajectory -- and that's above my pay grade.