139:24 On the Shabbos of Chanukah, we take out two sifrei Torah. In the first, we read the regular portion of the week. In the second, we read the maftir from the offerings of the Tribal leaders corresponding to the appropriate day of Chanukah. The haftarah is “Sing and rejoice” from Zechariah chapter 2. If there is a second Shabbos during Chanukah, the haftarah is about the menoros of Solomon, from I Kings chapter 7.
When Rosh Chodesh Teves falls on a weekday, we take out two sifrei Torah. In the first, we call up three men for the regular Rosh Chodesh reading. After that, a fourth reads in the second Torah corresponding to the appropriate day of Chanukah. Since Rosh Chodesh occurs more frequently than Chanukah, and the rule is that a more common thing comes before a less common thing, we read for Rosh Chodesh first. If they made a mistake and started to read the portion for Chanukah first, we don’t need to stop them. Instead, they finish the reading for Chanukah and then call up the rest for Rosh Chodesh. This is true even if they didn’t actually start to read yet, just that the one called up recited the brachos.
If the first person read for Rosh Chodesh correctly, but the fourth person erred and also read for Rosh Chodesh, even if they realized it immediately after the fourth person made the brachos, then if only one Torah had been taken out, there is no need to read any further. But if two sifrei Torah were taken out, there is a concern that people might think that there was a defect found in the second Torah. In order to dispel this concern, we call a fifth person to read the Chanukah portion. Half-kaddish is recited after this fifth aliyah. (If half-kaddish was recited after the fourth aliyah, it is not repeated – Mishnah Brurah 684:16.)
139:25 When Rosh Chodesh Teves falls on Shabbos, we take out three sifrei Torah. Six people (or more – MB 684:9) are called up to read the regular portion of the week from the first Torah. From the second Torah, a seventh person reads the portion for Rosh Chodesh starting from “on the Sabbath day.” Half-kaddish is recited, then the maftir for the appropriate day of Chanukah is read from the third Torah. The haftarah is ”Sing and rejoice” from Zechariah chapter 2. Even though a more common thing typically precedes a less common thing, this only applies when reading both things. When it comes to the haftarah, only one is read, so the Rosh Chodesh haftarah is preempted by the Chanukah haftarah, which is read to publicize the miracle.