Assuming the Type XXI was equipped with sonar, I would locate the damaged carrier, come up to the minimum firing depth, (I believe it's 45-60 meters or so) and fire off a salvo. If you have any acoustics I'd try blindfiring them as well while at firing depth, but that's just me.
However, I dunno if you have sonar, as you say it's a brand new XXI, and I don't know what year you're in. And if your radio room is damaged, it's probable that the sonar's out as well. In that case just go by the hydrophones, unless the carrier's dead in the water.
After all that/if that fails, then I'd try to make my escape. Hey, if you're going to go anyways, might as well take something big with you.