In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
2- Some scholars view that Prophet Muhammad (PBUHM) was shown the future when he saw people burning in the Hellfire.
3- It could be that the Prophet saw the souls of those who are already condemned, but the reality of that is known only to Allah the Almighty.
Sheikh Yahya Ibrahim answers your question in the following video:
Almighty Allah knows best.