Bamidbar22:28

וַיִּפְתַּח יְהוָה אֶת־פִּי הָאָתוֹן וַתֹּאמֶר לְבִלְעָם מֶה־עָשִׂיתִי לְךָ כִּי הִכִּיתַנִי זֶה שָׁלֹשׁ רְגָלִים׃

And the Eternal opened the mouth of the she-donkey, and she said to Bilam: "What have I done to you, that you have struck me these three times?"

Bamidbar 22:28

וַיִּפְתַּח יְהוָה אֶת־פִּי

Bamidbar / Numbers 22:28 · Remez

Bamidbar 22:28

וַיִּפְתַּח יְהוָה אֶת־פִּי הָאָתוֹן וַתֹּאמֶר לְבִלְעָם מֶה־עָשִׂיתִי לְךָ כִּי הִכִּיתַנִי זֶה שָׁלֹשׁ רְגָלִים׃

And the Eternal opened the mouth of the she-donkey, and she said to Bilam: "What have I done to you, that you have struck me these three times?"

Remez רֶמֶז

Three times

Sometimes an ordinary word carries a second meaning, and it matters more than the first. The she-donkey says "three times", and in Hebrew the word sounds like the name of the festivals.

Rashi: "three times" (שָׁלֹשׁ רְגָלִים) hints at the three pilgrimage festivals (רְגָלִים): Bilam (Balaam) wants to uproot the people that celebrates them. Rabbeinu Bahya: three times it says that the she-donkey saw the angel, three signs, and the fourth sign is her speech.

How Rashi and Rabbeinu Bahya explain it

Rashi These three times (רְגָלִים)

She hinted to him: you seek to uproot a nation that celebrates three pilgrimage festivals (רְגָלִים) a year.

Rabbeinu Bahya And the Eternal opened the mouth of the she-donkey

And if you look into the hidden in this section, you will find that the speech of the she-donkey is like the speech of the serpent: neither spoke of itself, for they have no speaking soul. That is why next to "And the Eternal opened the mouth of the she-donkey" comes "And the Eternal uncovered the eyes of Bilam (Balaam), and he saw the angel of the Eternal": as soon as she spoke and died, the angel was revealed to him and spoke with him. That is why the section says three times: "And the she-donkey saw the angel of the Eternal." She turned aside from the road, pressed his foot and lay down: these are three signs, and each one came from the angel, not to speak of the fourth sign, the speech.

Takeaway

The word רֶגֶל means "foot", "time" and "pilgrimage festival": on Pesach, Shavuot and Sukkot the people went on foot to Jerusalem (Shemot / Exodus 23:14).
The serpent spoke with Chava (Eve) in the garden of Eden (Bereshit / Genesis 3:1).
"And the she-donkey saw the angel of the Eternal" is said three times (Bamidbar / Numbers 22:23, 22:25, 22:27).