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, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
This man was mistaken when he talked to that non-Mahram (permanently unmarriageable) girl while he was in Hajj. If such relations are already prohibited outside Hajj, then it is more prohibited and graver a sin during Hajj given the sacredness of that time and place. If that man has only enjoyed talking to that girl, then he has to repent to Allaah and ask for His forgiveness. He also has to end this relationship. However, if he wants to marry her, then he has to do so.
Allaah Knows best.