Hoshea / Hosea 2:21 · Drash
וְאֵרַשְׂתִּיךְ לִי לְעוֹלָם וְאֵרַשְׂתִּיךְ לִי בְּצֶדֶק וּבְמִשְׁפָּט וּבְחֶסֶד וּבְרַחֲמִים׃
And I will betroth you to Me forever, and I will betroth you to Me in righteousness and in justice, in kindness and in mercy.
Drash דְּרָשׁ
A crown of four
When you do good, you are often answered in kind. And if you stop, the answer disappears too. What if kindness toward us depends on our righteousness?
Rashi: righteousness and justice are what people do, and kindness and mercy are what the Eternal answers them with. Avraham (Abraham) taught his children righteousness and justice, and against this his descendants received kindness and mercy. When they stopped doing righteousness, the Eternal took away kindness. When they return, He will add it and make a crown of all four.
How Rashi explain it
Rashi In kindness and in mercy
Which will come to you from Me through them. Of Avraham our father it is written: "For I have known him, so that he will command his children and his household after him, and they will keep the way of the Eternal, to do righteousness and justice" (Bereshit / Genesis 18:19). And against them the Holy One, blessed is He, gave his children kindness and mercy, as it says: "And He will give you mercy and have mercy on you" (Devarim / Deuteronomy 13:18), and it says: "And the Eternal your Almighty will keep for you the covenant and the kindness" (Devarim / Deuteronomy 7:12).
They stopped doing righteousness and justice, as it says: "You who turn justice into wormwood and cast righteousness to the ground" (Amos 5:7). And the Holy One, blessed is He, also took away from them kindness and mercy, as it says: "For I have taken away My peace from this people, the kindness and the mercy" (Yirmeyahu / Jeremiah 16:5). And when they again do righteousness and justice, as it says: "Tziyon (Zion) shall be redeemed with justice" (Yeshayahu / Isaiah 1:27), the Holy One, blessed is He, will add mercy and kindness to them, make a crown of all four and set them at their head.
Takeaway
In the Hebrew of Bereshit / Genesis 18:19 stand the same words as in Hoshea (Hosea): צְדָקָה וּמִשְׁפָּט, "righteousness and justice." That is how Rashi ties the two verses.
In the edition of Rashi the references to the last verses are inexact. The words "the covenant and the kindness" are in Devarim / Deuteronomy 7:12, and "I have taken away My peace" is in the prophet Yirmeyahu (Jeremiah) (Yirmeyahu / Jeremiah 16:5).
The four qualities of the verse: righteousness (צֶדֶק), justice (מִשְׁפָּט), kindness (חֶסֶד) and mercy (רַחֲמִים). The first two a person does, the other two the Eternal gives.