Who wrote the 2nd paragraph of Aleinu ?
Shalom, Your question is very timely, in that we are soon going to celebrate Rosh HaShana (New Year). Why is Aleinu connected to Rosh HaShana? Because the Aleinu prayer's original place in the prayer service is as part of the musaf Amidah for Rosh HaShana! It was only added to the end of our services sometime in the middle ages. In the siddur Otzar HaTefillah, Aleinu is accredited to Rav from the Talmud, to whom the sages ascribe the major blessings of the Rosh HaShana musaf amidah. He then quotes the Kol-Bo (one of the Rishonim) who writes "I have heard that Yehoshua (Joshua) wrote Aleinu when conquering Jericho". He points out that the first letters of the first four verses spell, in reverse, Hoshea, which was the original name of Yehoshua (Numbers 13:16) This is also found in the response attributed to Rav Hai Gaon. Rav Munk in his commentary on the siddur (The World of Prayer), raises the possibility that Rav incorporated the original prayer that Yehoshua wrote into his version. I have seen academic sources that attribute it (or at least parts of it) to the Men of the Great Assembly, during the period of the Second Temple. None of these sources differentiates between the first and second paragraphs. However the Seder HaYom (who lived in the 1500's) attributes the second paragraph to Achan – as hinted to in the initials of the first three words "Al Ken Nekaveh"- which spell out Achan in Hebrew. I am unaware of his source for this – though he may well have had an oral tradition. Blessings.