the only reason a person asks to be baptised is because he is a believer and is saved.<quoted text>It's true that we have no record of the thief being baptized, for he certainly had no opportunity to do so after accepting Jesus as his Lord and Saviour. He could not come down from the cross where he was being executed by the Roman authorities. Had he been able to descend from that cross, he would have done many things. He would have turned from his life of crime, made restitution for all he had stolen, and walked in full conformity to truth he now understood. But since it was physically impossible to do any of those things, the obedient life of Jesus was imputed to him. That is why God could accept him and Jesus could give him such a glorious assurance of salvation. The baptism of Jesus was credited to him - an act that would have been required of the thief had he been able to fulfill it.
By the way, the same transaction would take place today if the circumstances were similar. Suppose a man should approach me this very day, requesting baptism. His desire is so urgent and compelling that he begs me to do it immediately. We get in my car to drive to a nearby lake where there is a convenient place to conduct the service. But on the way to the lake there is a terrible accident. My passenger is killed in that accident. Would he be lost because he had not yet been immersed with his Lord? Of course not. He had made the decision and was in the process of obeying the Lord when he died. God never requires the impossible from anyone. But on the basis of what we have learned from the lips of Jesus, one can confidently conclude that if a person has the opportunity to be baptized and refuses to be, that man cannot enter the kingdom of heaven.
Water Baptism is not salvation it is a outward sign of an inward change that can only be caused by the Holy Spirit.
Your friend was saved , his desire to be baptised in water was the evidence of that.
God knew the good intentions of his heart.