I'm trying to write a timeline of Moses's greatest achievements and this is all I haven't found so far. If you know what the two ages of Moses are in relation to these two events, please let me know, that would be great!
According to the Bible, in Exodus 7:7 it states:
And Moses was eighty years old and Aaron eighty-three years old when they spoke to Pharaoh.
Therefore, Moses was at least 80 years old at the red Sea and at Sinai when he received the 10 Commandments from the LORD. To be a bit more specific, it took about 2 months to reach Sinai, but they spent 2 years at Sinai according to Numbers 10:11:
Now it came to pass on the twentieth day of the second month, in the second year, that the cloud was taken up from above the tabernacle of the Testimony.
So Moses was 80 or 81 years of age when he reached Sinai and 82 to 83 years of age when they left.
Moses was 40 when he fled Egypt, 80 when he parted the Red Sea and 120 when God took him away. (Reference) https://www.bibletimelines.com/timelines/moses--the-exodus-timeline
Although it is now widely accepted by scholars that Moses does not exist, I will take the question to mean:
How old was Moses, according to the Bible, when he parted the red sea (or reed sea), and how old was he when he wrote the ten commandments?
An important point, is that Moses did not write the ten commandments, according to the Bible. God wrote it by Himself.
According to the Bible, when he was 80 years old, he started leading the Israelites out of Egypt, parting the red sea, also receiving the ten commandments.
However, the 80 is an approximation (his life is divided into three stages of 40 years), so you can just take it as around 80.
Moses’ life is generally broken down into three 40-year periods. The first is his life in the court of pharaoh. As the adopted son of pharaoh’s daughter, Moses would have had all the perks and privileges of a prince of Egypt. [...] [T]the next chapter in Moses’ life, [is] his 40 years in the land of Midian. During this time, Moses learned the simple life of a shepherd, a husband, and a father. [...] [T]he Bible doesn’t spend a lot of time on the details of this part of Moses’ life[.] [...] The third and final chapter in Moses’ life is the chapter that Scripture spends the most time chronicling, namely, his role in the redemption of Israel.