Why did the ass take Bil'am to task only after the third time?
Rashi: Refer to 22:26:1:1.
Na'ar Yonasan: Because the first two times Bil'am had reason to strike it
Na'ar Yonasan. Notre also that the third time Bil'am struck it with a staff, which evidently he did not do the first two times.
Why did Hashem cause the ass to speak?
Seforno: To teach Bil'am that Hashem is the Master of speech
How does the ass speaking conform to the principle that, since the time of the creation, Hashem never created anything new?
Targum Yonasan: The mouth of the ass is one of the ten miraculous creations that Hashem created Erev Shabbos at dusk. 1
Targum Yonasan: 1. The Manna, 2. Miriam's well, 3. Moshe's staff, 4. the Shamir ('worm'), 5. the rainbow, 6. the Ananei Kavod, 7. the mouth of the earth (of Korach), 8. the writing on the Luchos, 9. the Mazikin (the demons) and 10. the mouth of the ass. See also Pirkei Avos, 5:6.
Why did the ass use the expression "Shalosh Regalim" rather than "Shalosh Pe'amim"?
Rashi: It was hinting to Bil'am that he was wasting his time going to curse a nation that celebrated the Shalosh Regalim (the three foot-festivals).