"Pharaoh's chariots and his host He has cast into the sea" (Exodus 15:4): By the measure with which a person measures, it is measured out to him. They said, "Who is the LORD that I should hearken to His voice?" (Exodus 5:2), and so You too measured out to them by that same measure; therefore it is said, "He has cast into the sea." One verse says "yarah" [He cast] and one verse says "ramah" [He hurled], and so on.
Measure for Measure and Pharaoh's Chariots Cast into the Sea
Yalkut Shimoni on Torah 246:2
(שמות טו ד) מַרְכְּבֹת פַּרְעֹה וְחֵילוֹ יָרָה בַיָּם. בְּמִדָּה שֶׁאָדָם מוֹדֵד בָּהּ מוֹדְדִין לוֹ. הֵם אָמְרוּ (שמות ה, ב) "מִי ה' אֲשֶׁר אֶשְׁמַע בְּקֹלוֹ", וְאַף אַתָּה בְּאוֹתָהּ מִדָּה מָדַדְתָּ לָהֶם, לְכָךְ נֶאֱמַר יָרָה בַיָּם, כָּתוּב אֶחָד אוֹמֵר יָרָה וְכָתוּב אֶחָד אוֹמֵר "רָמָה" וְכוּ'.