As is well known (e.g. from Tosafos to M'gila 31:2 or from Shulchan Aruch Orach Chayim 428:8), we have three haftaros of punishment, followed by seven of consolation and then two of return (repentance). Why these numbers specifically?
I don't know about 2 of repentance, but about 3 of punishment and 7 consolation I've heard the following explanation from the lecture of Rav Pinkus.
When we see a number 10 that is splited to 3 and 7 it means the cause and effect. The source if this is in sfiros (I don't undarstand that part much, but anyway) 3 high sfiros are the source and the rest 7 are derived from those 3.
Another example is in the following pasuk (Dvorim 8:7): אֶרֶץ נַחֲלֵי מָיִם עֲיָנֹת וּתְהֹמֹת those are 3 causes and the next pasuk is the famous אֶרֶץ חִטָּה וּשְׂעֹרָה וְגֶפֶן וּתְאֵנָה וְרִמּוֹן אֶרֶץ זֵית שֶׁמֶן וּדְבָשׁ. those are 7 effects.
From this the answer is obvious, we all know that כל המתאבל על ירושלים, זוכה ורואה בשמחתה (The one who mourns about Jerusalem, would see her joy). Hence 3 of punishment is the cause and 7 of consolation if the effect.