Can a person who is in hell, repent and get saved and leave hell?
The Bible teaches very clearly that once a person dies, they are judged and if found without Christ in their hearts, they will go to hell for all eternity.
Hebrews 9:27
27 And just as it is appointed for people to die once—and after this, judgment
John 3:18
18 Anyone who believes in him is not condemned, but anyone who does not believe is already condemned, because he has not believed in the name of the one and only Son of God.
A person, while living on earth who has rejected the Lord Jesus stays condemned, once they die, it will be final.
Revelation 14:9-11
9 And another, a third angel, followed them and spoke with a loud voice: “If anyone worships the beast and its image and receives a mark on his forehead or on his hand, 10 he will also drink the wine of God’s wrath, which is poured full strength into the cup of his anger. He will be tormented with fire and sulfur in the sight of the holy angels and in the sight of the Lamb, 11 and the smoke of their torment will go up forever and ever. There is no rest day or night for those who worship the beast and its image, or anyone who receives the mark of its name.
By receiving the Mark of the Beast, the person has rejected Christ. In verse 11, their torment will endure forever and ever without having a chance to repent or get out.