Bamidbar 25:6 says:
וְהִנֵּה אִישׁ מִבְּנֵי יִשְׂרָאֵל בָּא, וַיַּקְרֵב אֶל-אֶחָיו אֶת-הַמִּדְיָנִית, לְעֵינֵי מֹשֶׁה, וּלְעֵינֵי כָּל-עֲדַת בְּנֵי-יִשְׂרָאֵל; וְהֵמָּה בֹכִים, פֶּתַח אֹהֶל מוֹעֵד.
And, behold, one of the children of Israel came and brought unto his brethren a Midianitish woman in the sight of Moses, and in the sight of all the congregation of the children of Israel, while they were weeping at the door of the tent of meeting.
(Translation credit to Mechon Mamre)
This seems to be quite clear that they were outside in public. This goes along with what I have always learned which was that a קנאי is only permitted to kill someone if they are having relations with a non-Jew in public.
Rambam seems to confirm this in Issurei Biah 12:4:
כל הבועל גויה, בין דרך חתנות בין דרך זנות--אם בעלה בפרהסיה, והוא שיבעול לעיני עשרה מישראל או יתר--אם פגעו בו קנאין והרגוהו, הרי אלו משובחין וזריזין; ודבר זה הלכה למשה מסיניי הוא, וראיה לדבר זה מעשה פינחס בזמרי.
Anyone who has relations with a non-Jewish woman, whether in the context of marriage or not, if he had relations with her in public (meaning in the view of 10 or more adult Jewish men) and zealots strike and kill him, this is considered praisworthy. This is a halacha l'Moshe mi'Sinai and the proof for it is the incident of Pinchas and Zimri.
(translation mine)
However, the Torah then proceeds to say (apparently quite clearly as well), that Pinchas followed them inside to kill them:
וַיָּבֹא אַחַר אִישׁ-יִשְׂרָאֵל אֶל-הַקֻּבָּה, וַיִּדְקֹר אֶת-שְׁנֵיהֶם--אֵת אִישׁ יִשְׂרָאֵל, וְאֶת-הָאִשָּׁה אֶל-קֳבָתָהּ; וַתֵּעָצַר, הַמַּגֵּפָה, מֵעַל, בְּנֵי יִשְׂרָאֵל.
And he went after the man of Israel into the chamber, and thrust both of them through, the man of Israel, and the woman through her belly. So the plague was stayed from the children of Israel.
(translation Mechon Mamre)
This seems strange to me. If they were inside a chamber at the time of the event, it doesn't seem like it would really cause the same kind of chilul hashem that would allow a zealot to kill them.
So were they inside or outside when Pinchas killed them?