Yes, children certainly can ask hard questions! But we shouldn't discourage them or make them think we don't take them seriously (even when we suspect they are just trying to stump us!). Jesus said, "Let the little children come to me, and do not hinder them, for the kingdom of God belongs to such as these" (Mark 10:14).
Our only glimpse in the Bible of Jesus' childhood took place when He was 12. He became separated from His parents, and later they found Him "in the temple courts, sitting among the teachers, listening to them and asking them questions" (Luke 2:46). Jesus learned about God from others, and so do our own children.
I probably would have answered this question the same way you did: God has no beginning or end, because He has always existed. As the Bible says, "Before the mountains were born or you brought forth the earth and the world, from everlasting to everlasting you are God" (Psalm 90:2). I might have gone on to say that God is far greater than we are, and there are many things about Him we can't fully understand–just as they didn't understand some things when they were two years old that they understand now.
I hope you will thank God for the privilege He has given you of teaching these children about Him. Above all, ask Him to help you point them to Jesus and His love.