The rich man prayed from hell. The only man in the Bible that prayed from hell was Jesus.
Luke 22:42-44
42Saying, Father, if thou be willing, remove this cup from me: nevertheless not my will, but thine, be done.
43And there appeared an angel unto him from heaven, strengthening him.
44And
being in an agony he prayed more earnestly: and his sweat was as it were great drops of blood falling down to the ground.
Luke 16:27-28
27Then he said, I
pray thee therefore, father, that thou wouldest send him to my father's house:
28For I have five brethren; that he may testify unto them, lest they also come into this place of torment.
God doesn't hear the prayers of the wicked.
John 9:31
Now we know that God heareth not sinners: but if any man be a worshipper of God, and doeth his will, him he heareth.