I believe Moses was about 40 when he made the decision to be among his brethren, the Hebrews, instead of being called the son of Pharaoh. He then fled to the land of Midian before God called him to lead the people. We know the people wondered in the wilderness for 40 years, Moses dying at the age of 120. How long was Moses in Egypt after he returned to lead the people? How long did it take God to perform the curses against Pharaoh and Egypt?
Here’s what the Bible tells us. As you’ve said, Moses was 40 years old when he was forced to leave Egypt and flee into Midian (Acts 7:23-29) where he remained for 40 more years until the Lord called him to go back to deliver the Israelites from Egypt (Acts 7:30-34). Exodus 7:6 tells us Moses was 80 years old when he first spoke to Pharaoh about releasing the Israelites.
From Deut. 34:7 we learn that Moses was 120 years old when he died, just before the Israelites crossed the Jordan River into the promised Land.
Therefore his life can be divided into 3 segments. 40 Years as the son of Pharaoh, 40 years in Midian, and 40 years in the wilderness with the Israelites.
The specific length of time required for the Lord to complete the plagues of Egypt is not revealed, but scholars have estimated that they happened quickly. The Jewish Mishnah says they took one year, but other opinions range from 40 days for the actual plagues to a few months when you add the time between them. Perhaps the Mishnah meant to say they happened within a single year.