When a woman's husband dies and she marries another man; with whom she shall be in Jannah, with her first husband or second husband?
The Prophet Muhammad (SAWS) said:
قال رسول الله صلى الله عليه وسلم : المرأة لآخر أزواجها
Allah’s Messenger (pbuh) said: ‘In the Paradise,] a woman will be with her last husband.’
-Tabaqaat Abu Shaikh p.270. Albani classified it as Sahih in Silsala Sahiha H. 1281
In this hadith, it clearly states that a woman would be with her last husband.
Huzaifa (Prophet's Companion) said to his wife,
قال حذيفة لامرأته إن أردت أن تكوني زوجتي في الجنة فلا تزوجي بعدي فإن المرأة لآخر أزواجها ، ولذلك حرم الله تعالى على أزواج رسول الله صلى الله عليه وسلم أن يتزوجن بعده
'If you wish to be my wife in the Heaven do not marry anyone after me for a woman will be with last of his husbands and for this reason Allah forbade it for the wives of the Messenger (pbuh) to remarry after him.'
-Mushkil Al-Athaar 2/147 Hadith 552
The statement, 'Allah forbade it for the wives of the Messenger (pbuh) to remarry after him' is mentioned in the Qu'ran:
يَا أَيُّهَا الَّذِينَ آَمَنُوا....وَمَا كَانَ لَكُمْ أَنْ تُؤْذُوا رَسُولَ اللَّهِ وَلَا أَنْ تَنْكِحُوا أَزْوَاجَهُ مِنْ بَعْدِهِ أَبَدًا إِنَّ ذَلِكُمْ كَانَ عِنْدَ اللَّهِ عَظِيمً
"O ye who believe! … Nor is it right for you that ye should annoy Allah's Messenger, or that ye should marry his widows after him at any time. Truly such a thing is in Allah's sight an enormity."
The best view on this is that a woman will be with her last husband in Jannah.
Other views have hadith which are weak or ignored. See this.
And Allah knows best.