In this view, the law is to be obeyed because we want to earn something, we want to gain God's favor. In making this connection of law and legalism, we have forgotten that the law comes after Israel's salvation and in response to it. We have forgotten that Israel's liberation was an act of God's grace, not a necessary response to Israel's merit. The understanding of Israel's liberation from Egypt as an instance of God's grace in which God alone acts to deliver is underscored by the concluding act in this drama of Israel's salvation. In Exodus 14 we find the Egyptian army pursuing the Israelites, pinning them against the shore of the sea.
Annihilation seems certain.
The people are powerless against this juggernaut. Would that they had stayed in Egypt. Slaves yes, but dead no. See the salvation of Yahweh which Yahweh will perform for you today, for you will never again see the Egyptians as you see them today. Israel is to do nothing.