Exodus 13:14
12 then you must give over to the Lord the first offspring of every womb. Every firstling of a beast that you have—the males will be the Lord’s. 13 Every firstling of a donkey you must redeem with a lamb, and if you do not redeem it, then you must break its neck. Every firstborn of your sons you must redeem. 14 “In the future, when your son asks you ‘What is this?’ you are to tell him, ‘With a mighty hand the Lord brought us out from Egypt, from the land of slavery. 15 When Pharaoh stubbornly refused to release us, the Lord killed all the firstborn in the land of Egypt, from the firstborn of people to the firstborn of animals. That is why I am sacrificing to the Lord the first male offspring of every womb, but all my firstborn sons I redeem.’ 16 It will be for a sign on your hand and for frontlets on your forehead, for with a mighty hand the Lord brought us out of Egypt.”
Joshua 4:6
4 Joshua summoned the 12 men he had appointed from the Israelites, one per tribe. 5 Joshua told them, “Go in front of the ark of the Lord your God to the middle of the Jordan. Each of you is to put a stone on his shoulder, according to the number of the Israelite tribes. 6 The stones will be a reminder to you. When your children ask someday, ‘Why are these stones important to you?’ 7 tell them how the water of the Jordan stopped flowing before the ark of the covenant of the Lord. When it crossed the Jordan, the water of the Jordan stopped flowing. These stones will be a lasting memorial for the Israelites.” 8 The Israelites did just as Joshua commanded. They picked up 12 stones, according to the number of the Israelite tribes, from the middle of the Jordan as the Lord had instructed Joshua. They carried them over with them to the camp and put them there.
Notes and References
"... This story of the twelve stones set up on the other side of the Jordan seems to reflect Moses’ order in Deuteronomy 27:1–6. The verbal form “he had appointed” in verse 4 is not easy to understand. Joshua calls the twelve men appointed already and transmits the divine command in verses 4–5 ... Verse 6–7 are composed in the form of question and answer between parents and children, in which parents teach their children the meaning of Yahweh’s presence in Israel’s history. A similar expression to Joshua 4:6–7 also appears in Deuteronomy 6:20–21 ... The structure of each verse in both Joshua 4:6–7 and Deuteronomy 6:20–21 is almost identical. However, Joshua 4:6–7 has a much longer and developed form ... Thus, Joshua 4:6–7 seem to be later than and influenced by Deuteronomy 6:20. However, a similar non-Priestly text in Exodus 13:8–10 appears to be influenced by the expression in Joshua 4:6–7 ... Even though in Joshua 4:6–7 twelve memorial stones are a sign, in Exodus 13:8–9 the ritual serves as a sign for their hand, as a reminder for their forehead, so that the 'Law of YHWH' may be on their lips. Exodus 13:8–9 shows a more concretized and developed ritual form. Furthermore, Exodus 13:10 shows the more firmly established ritual, which is mainly used in the book of Leviticus. Thus, we could surmise that this non-Priestly text is later than Joshua 4:6–7. How about similar Priestly texts in Exodus 12:26–27 and 13:14–15? ..."
Lee, Eun-Woo Crossing the Jordan: Diachrony versus Synchrony in the Book of Joshua (pp. 172-173) Bloomsbury T&T Clark, 2013