How to perform the witr prayer in terms of connection (wasl) and separation (fasl)?
Praise be to Allah, and peace and blessings be upon our Master, the Messenger of Allah.
The Witr prayer has several forms that vary in terms of virtue:
The First Form: Separating every two units (rak‘ah) with a Tashahhud and a Taslim (salutation). This is superior to connecting the units, even if it is only a single rak‘ah. This is based on the Hadith of ‘Aishah (may Allah be pleased with her): 'The Messenger of Allah ﷺ used to pray eleven units between the end of the ‘Isha prayer and dawn, performing the Taslim after every two units and performing Witr with a single unit.' (Related by al-Bukhari & Muslim).
The Second Form: Connecting the units with only one final Tashahhud at the very end.
The Third Form: Connecting with two Tashahhuds—meaning reciting the Tashahhud before the final unit without performing the Taslim, then standing to complete the final unit. This form is considered the lowest in rank so that the Witr prayer remains distinct from the obligatory Maghrib prayer, as stated in the Hadith: 'Do not make the Witr resemble the Maghrib prayer.' (Narrated by Al-Daraqutni, who stated its narrators are trustworthy).
It is stated in Bushra al-Karim Sharh al-Muqaddimah al-Hadramiyyah: 'It is permissible to connect [the Witr] with one Tashahhud in the final unit—which is better—or with two Tashahhuds in the last two units, as both methods are established in Sahih Muslim from the actions of the Prophet ﷺ. In the connected method, more than two Tashahhuds are prohibited. Furthermore, separating (al-Fasl) is better than connecting (al-Wasl) if the number of units is the same, because the Hadiths supporting it are more numerous and it involves more devotional actions.' And Allah the Exalted knows best."
What is the ruling on someone who eats or drinks thinking that the sun has set, then realizes that it has not yet set?
Whoever eats or drinks believing that the sun has set, then later discovers that it has not yet set, their fast is invalid, and they must make up that day after Ramadan. It is not permissible to break the fast before confirming sunset—either by seeing it, through personal reasoning, or by relying on the statement of someone trustworthy in their religious commitment.
Does passing wind, from the anus without a smell, invalidate prayer?
If a person is certain of having passed wind even if it was with no smell, then both his/her ablution and prayer are invalidated, thus he/she should remake ablution and re-perform prayer.
What is the ruling on a person in a state of major impurity (junub) walking or eating before performing the ritual bath?
It is from the Sunnah for a Muslim to hasten to perform the ritual bath for major impurity. However, if he delays it, he does not sin provided he does not miss the prayer. It is permissible for the junub to walk, eat, drink, and sleep. It is recommended for him to perform ablution before these actions to reduce the state of impurity, although the best is for him to perform the ritual bath. And Allah the Almighty knows best.