So, it is obvious that the angel with the flaming sword was there to guard the tree of life, situated at the east of the garden. That's granted.
So, the only answer is that the whole region at the time as the Garden of Eden, and people multiplied and moved away from the region to establish themselves in other regions. So, there is a valid point that Cain and Abel were still in the area of Eden, but not in the actual place where the tree of life was.
Then, after Cain killed Abel, he married either one of his sisters or any of his brothers' children, and went to the land of Nod. After all, in the many years after Cain and Abel were born, people were very fertile and many more children were born, so by the time Cain and Abel were mature men, the then known region was well populated.