All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If this person doubts his faith and he is conscious about what he said, then he has indeed disbelieved in Allaah. Therefore, he is obliged to repent to Allaah and re-embrace Islam. He must be advised not to do this again in the future. If he repents from this sin, Allaah will accept his repentance. In which case it would be acceptable to deal with him and his matter [whether or not he is sincere in this] is to Allaah. However, if he does not repent, it is permissible to continue the relationship with him and be kind to him with the purpose of influencing him and softening his heart to the truth, as this is expected from him.
The best act which you could do for him is to call him to return to the truth. For more benefit, please refer to Fataawa 88750 and 87672.
Finally, it should be noted that the people in the question [A & B] are not known to us, if they are a man and a woman who is not a Mahram to him, then it is not permissible for them to establish a relationship outside marriage. They must cut this relationship and repent to Allaah. For more benefit, please refer to Fatwa 81356.
Allaah Knows best.