וַיְהִ֣י בְשָׁלֵ֣ם סֻכּ֑וֹ וּמְע֖וֹנָת֣וֹ בְצִיּֽוֹן׃
Son tabernacle n’est-il pas dans Salem, et sa demeure dans Sion?
Rashi
ואכבדה בפרעה AND I WILL BE HONOURED THROUGH PHARAOH — When the Holy One, blessed be He, takes vengeance on the wicked His name is magnified and honoured. Thus, too, it states, (Ezekiel 38:22, 23) “And I will plead against him [with pestilence and with blood etc.]”, and afterwards, “Thus I shall be magnified and sanctified etc.” And it states, (Psalms 76:3) “There He broke the fiery shafts of the bow”, and afterwards (after He has done this) (v. 2) “In Judah is God known. “Further it states, (Psalms 9:17) “The Lord is known because He executeth judgment” (Mekhilta).
Abarbanel
And it's also possible to explain the phrase "I command and the house of Israel will be shaken..." about the total exile (not just the birth pangs/ingathering) that Gd will not destroy Israel because of sin but rather will shake out them among the exile and the sinners wll fall. And afterwards (Amos 9:11) "on that day" meaning to say at that time that is auspcious towards Me for the redemption, "I will raise up the fallen sukkah of Dovid..." An alternative meaning of "on that day" is that at that time when the sinners will be finished because of the movement of the exile, I will raise the fallen sukkah of Dovid. And if you say it will not be raised as Amos said earlier "fallen and will not rise is the virgin daughter or Israel" this means, she will not rise on her own and will not have a king from the shvatim. But now, Gd will raise the sukkah of Dovid that fell in the days of Jerobam and will appoint a king from the house of Dovid Hamelech on His people. And the "fall" of the house of Dovid began during the first Temple era with the splitting of the 10 tribes into a separate kingdom. ANd during the second Temple there was no king from the house of David. Rather the Hasmoneans and Herod's house were the rulers. Therefore the prophet Amos says "I will mend its breaches" the breaches are the kings that the ten tribes set up for themsleves during the first Temple era. And regarding the second Temple "I will rebuild its ruins" ruins indicate a total destruction (as opposed to breaches) because during that era there was no Davidic rule on any of the tribes. And then the pasuk continues "I will build it like the days of yore" as strong and grounded as it was in the past. And I already explained earlier in this pasuk a different and correct explain that the word "et' in "et sukkat" is used similarly to the word "et" in Shemot 1:1 where it means "with". That along "with" the rebuilding of Dovid's sukah, Gd will also raise the fallen, who refer to the tribes of Israel (called fallen by Amos above) . And sukkat Dovid therefore refers to the tribes of Judah. And about both groups the prophet says "I will repair their breaches" about the house of Dovid, I will rebuilt the ruins, beacuse the 10 tribes will be restored to Davidic rule. And the sukkah in this case refers to Jerusalem which will be complete like the days of yore (Psalms 76:3)
Radak
ומלכי צדק מלך שלם, the word שלם is another word for ירושלים, and we find it referred to as such in Psalms 76,3 ויהי בשלם סכו, “Salem became His abode.” It was customary to give the title Malki Tzedek or Adoni Tzedek, to kings of Jerusalem in those days, just as the kings of Egypt were called Pharaoh. Compare Joshua 10,1 where we find אדני צדק מלך ירושלים. Jerusalem traditionally represented the center of righteousness and peace. It is a place in which iniquity is less tolerated than anywhere else. This is why the Torah warned in Leviticus 18,28 that the Israelites should take care that the land not spew them out just as it had spewed out previous inhabitants because they had defiled it. The reason the Torah in Deuteronomy 31,16 uses the somewhat enigmatic expression אלוהי נכר הארץ, is that the kind of conduct by the people in that city that were spewed out, was a conduct that was irreconcilable (alien) with the very nature, spiritual climate, prevailing in, and being part of that holy city. The sons of Korach already recognised and extolled this spiritual climate of the very city when they said in Psalms 48,3 יפה נוף משוש כל הארץ הר ציון ירכתי צפון קרית מלך רב, “fair-crested, joy of all the earth, Mount Zion, summit of Tzafon, city of the great King.” In the Midrash quoted by Rashi, Malki Tzedek is identified as Shem, the son of Noach.