Is this Hadith hassan or da'if?
Well i found it in Sunan abi Dawod qualified as hassan by al-Albany.
It could also be found in many books like Musnad al-Imam Ahmad (and this was qulified as da'if by the Muhadith Shoayb al-Arnaot) and also in Sahih ibn Abi Shaybah etc. Now in all the chains there's Abderrahman ibn Thabit ibn Thawban عبد الرحمن بن ثابت بن ثوبان who's qualified to be dai'f. And in the book Mizan al-I'tidal Imam ad-Dahaby considered this narration by Abderrahman ibn Thabit ibn Thawban as one of his manakeer!
See also about Qulaifiyng this hadith and the narrator in special here (in Arabic)
How to explain it assuming it's sane
Now if we assume that this hadith has some soundness then:
"The flourishing state of Jerusalem" could mean that it will flourish by people, money and real estates.
"And the ruined state of Yathrib" could mean in this context the reason for that!
An other meaning for the flousishing of Jerusalem could be that the Khelafa will settle down there at the end of time which goes ahead with an other narration in Sunan abi Dawood.
"the ruined state of Yathrib will be when the great war comes" was explained as a great war between the people of Levant and the Rum.
...
But the Hadith has a Problem: As it says that the ruined state of Yatrib will be before the Dajal comes forth. As we have Sahih ahadith that tell us that the Dajal won't be able to enter Yatrib. But Ibn Kathir tried to explain this by saying that Medina won't be ruined totally before the Dajal comes forth but at the end of time.
See also this Fatwa in Arabic. And here are other interpretations of the hadith in Arabic.
An other Problem in my opinion is the conquest of Constantinople which already have been conquered ages ago, but i don't know the future and therefore even this could be explained somehow!
And Allah knows best!