EDIT: Figured out question, don't worry guys.
This is a variation of the classic twin paradox, and the explanation is basically the same.
If you're not familiar with the twin paradox, start with this link. The question you're asking ("the people in the two spaceships saw each other's time dilate. So how can they be the same age when they get back to earth?") is similar to the question "How does Stella end up aging less when she saw Terence's time dilate?".
Separate names with a comma.