This is from Jerusalem and the Bible, a series of shiurim by Rav Yitzchak Levy.
1. Rabbinical Sources
A. In the Midrash (Bereishit Rabba 26, 10), we read:
“Avraham called it [the place] ‘Yir’eh,’ as it is written, ‘Avraham called the name of that place Hashem Yir’eh.’ Shem called it ‘Shalem,’ as it is written, ‘Malki-Tzedek, King of Shalem.’ The Holy One said: If I call the place ‘Yir’eh,’ as Avraham called it, then Shem – a righteous man – will be offended. If I call it ‘Shalem,’ then Avraham – a righteous man – will be offended. So I shall call it “Yerushalayim,” as both of them called it: [Yir’eh] Shalem – Yerushalayim.”
The Midrash explains that the name of the city is actually made up of two names, based on Avrham’s two distinct encounters with the city: his meeting with Malki-Tzedek, King of Shalem (Bereishit 14), and the story of the Akeida (Bereishit 22).
From the Midrash, it arises that the name of the city is formed as a result of two different events. In other words, the character of the city is a combination of two different qualities. Aside from this, from the language of the Midrash we learn that the Holy One tried, as it were, to join these two qualities together and to integrate them into the same place. In order for Jerusalem to exist, these two meanings must be unified.
Different interpretations may be attached to this name combination, pointing to different ways of understanding the character of the city and the combination of its two elements. We shall attempt, in this shiur, to present the various understandings of the two elements of the city and the nature of the unity that they create.
B. The above Midrash appears in rabbinical sources in several versions:
“Avraham called the name of that place ‘Hashem Yir’eh‘: Two righteous people gave it [the city] two [different] names: Shem called it ‘Shalem,’ Avraham called it ‘Yir’eh.’ The Holy One said: to cancel either of them is impossible, so I shall join them together and call it ‘Yerushalem‘ – ‘Yir’eh shalem‘ (“He shall see its perfection”), with a ‘vav‘ instead of the ‘alef‘ and ‘heh.’ What is the meaning of “yir’eh“? THIS IS A PLACE OF AWE (yir’a) AND SERVICE OF GOD.” (Midrash Ha-gadol, Bereishit 22:14).
The Midrash Ha-gadol adds two new pieces of information:
1. The word “yir’eh” is understood as “yeru” – the first letters of the name “Yerushalayim.” In other words, the letter vav (“u” sound) in “YerUshalayim” replaces the letters heh and alef in “yir’EH” – which is confirmed by the numerical value of these letters: vav (6) = alef (1) + heh (5) .
2. The word “yir’eh” is understood in the sense of a place of awe (“yir’a“) and service of God.
C. “We find that the Temple is called ‘Shalem,’ as it is written:
“Malkit-Tzedek, King of Shalem,” and this was Shem, son of Noach… Avraham called the [place of the] Temple ‘Yir’eh,’ as it is written, ‘Avraham called the name of that place ‘Hashem Yir’eh.’ The Holy One said: If I call it ‘Shalem,’ as Shem did, I will be nullifying the words of my beloved Avraham, who called it ‘Yir’eh.’ If I call it ‘Yir’eh,’ I shall be nullifying the words of the righteous Shem, who called it ‘Shalem.'” What did the Holy One do? He joined together the names that each had given: Avraham called it ‘Yir’eh,’ Shem called it ‘Shalem,’ and the Holy One called it ‘Yerushalayim.’ Thus: ‘His Tabernacle is in Shalem.’ And what is Yerushalayim? ‘Yir’eh‘ and ‘Shalem.'” (Midrash Tehillim, 76).