Here, hope this helps:
"And the number… shall be: What is the connection of retribution and consolation juxtaposed in one speech? Our Rabbis explained in Pesachim (87b): Hosea felt that he had sinned by saying, “Exchange them for another nation.” He stood and begged mercy for them (See above 1:2). And in Sifrei Devei Rav, in the section commencing: “And Israel abode in ****tim” (Num. 25) we learned: Rabbi says: Some sections are close to each other yet as far apart as east is far from west. “For you are not My people… And the number of the children of Israel shall be as the sand of the sea.” What is the connection of one to the other? This can be compared to a king who became angry with his wife. He summoned a scribe to come and write a bill of divorcement. Before the scribe arrived, the king became reconciled with his wife. Said the king, “Is it possible that this scribe should leave here divided?” I.e. his heart should be divided and bewildered, saying, “Why did the king send for me?” He said to him, “Come and write that I am doubling her kethubah.” And according to its simple meaning, this is the reason for its juxtaposition. “For you are not My people, and I will not be yours.” I will show Myself as though I am not yours, and you shall be exiled among the nations, and even there you shall multiply and grow, and there you shall lay it to your heart to return to Me, as it is said through Moses (
Deut. 30:1,3): “And you shall lay it to your heart among all the nations where… has exiled you etc. And the Lord your God shall return your captivity.” Here too, “And the children of Judah and the children of Israel shall be gathered together.”