The beginning of Parshat Pinchas is connected to the end of Parshat Balak. To be accurate Pinchas doesn’t actually do anything in the parsha named after him. He does his zealous act at the end of last weeks parsha. Last week we read
וְהִנֵּ֡ה אִישׁ֩ מִבְּנֵ֨י יִשְׂרָאֵ֜ל בָּ֗א וַיַּקְרֵ֤ב אֶל־אֶחָיו֙ אֶת־הַמִּדְיָנִ֔ית לְעֵינֵ֣י משֶׁ֔ה וּלְעֵינֵ֖י כָּל־עֲדַ֣ת בְּנֵֽי־יִשְׂרָאֵ֑ל וְהֵ֣מָּה בֹכִ֔ים פֶּ֖תַח אֹ֥הֶל מוֹעֵֽד
Then an Israelite man came and brought the Midianite woman to his brethren, before the eyes of Moses and before the eyes of the entire congregation of the children of Israel, while they were weeping at the entrance of the Tent of Meeting
וַיַּ֗רְא פִּֽינְחָס֙ בֶּן־אֶלְעָזָ֔ר בֶּן־אַֽהֲרֹ֖ן הַכֹּהֵ֑ן וַיָּ֨קָם֙ מִתּ֣וֹךְ הָֽעֵדָ֔ה וַיִּקַּ֥ח רֹ֖מַח בְּיָדֽוֹ …. וַתֵּֽעָצַר֙ הַמַּגֵּפָ֔ה מֵעַ֖ל בְּנֵ֥י יִשְׂרָאֵֽל
Pinchas the son of Eleazar the son of Aaron the kohen saw this, arose from the congregation, and took a spear in his hand. He went after the Israelite man into the chamber and drove [it through] both of them; the Israelite man, and the woman through her stomach, and the plague ceased from the children of Israel.
It is interesting to note that last week the two sinners were anonymous "An Israelite man" "a Midianite women", this week the Torah "Leaks" their names.