What should one who forgot to offer the second Sajda during congregational prayer, and remembered it before the end of the prayer do?
All perfect praise be to Allah, The Lord of The Worlds. Whoever forgets a pillar of prayer while in congregation must follow the lead of the Imam, and after the latter offers Tasleem, he should offer one Rakah, then perform Sujood As-Sahw (prostration of forgetfulness). And Allah Knows Best.
Is prayer nullified by having thoughts while performing it?
Prayer isn`t nullified by having thoughts while performing it, provided that the praying person offers all of its pillars and meets all of its conditions. However, the reward decreases significantly in the absence of reverence since a praying person is rewarded according to the attentiveness of his/her heart during prayer.
When the soul leaves the body, does it hear and see? And where does the soul go?
The important thing is that the soul departs while its owner is a believing, repentant Muslim, as this is a good ending. As for the details, they are lengthy. The grave is either a garden from the gardens of Paradise or a pit from the pits of Hellfire. And Allah The Almighty Knows Best.
How is night prayer offered?
Night prayer is offering voluntary prayer after Maghrib and before Fajr (Dawn). As for Tahajjud, it is offering voluntary prayer at night after waking up voluntarily, and for Allah`s sake as He Says (What means): "And pray in the small watches of the morning: (it would be) an additional prayer (or spiritual profit) for thee: soon will thy Lord raise thee to a Station of Praise and Glory!" [Al-Isra`/79]. Offering Tahajjud is better than offering voluntary prayer before going to bed.