Just incase anyone is shocked. There’s 2 possibilities to this! Either he made a lucky guess that came to pass or he’s a fortune teller.
We are told in our deen that fortune tellers exist, they get their unseen news from the Jinn and it’s mixed with 100 lies for every truth they predict.
Our religion warns us against fortune tellers. It is not permissible to go to soothsayers and fortune tellers, because the Prophet (peace and blessings of Allah be upon him) said: “Whoever goes to a fortune-teller and asks him about something, his prayer will not be accepted for forty nights.” Narrated by Muslim (2230).
And he (peace and blessings of Allah be upon him) said: “Whoever has intercourse with a menstruating woman or with a woman in her back passage, or goes to a fortune teller and believes what he says, has disbelieved in that which Allah revealed to Muhammad (peace and blessings of Allah be upon him).” Narrated by Abu Dawood (3904), al-Tirmidhi (3904) and Ibn Majaah (936); classed as saheeh by al-Albaani in Saheeh Ibn Maajah.