In the end of Ender's Game, it says that Valentine was 25 and Peter was 77, which would mean that he was 52 years older than her. However, Valentine was originally only 2 years younger than him. This is explained as being because she travelled for 50 years in Earth time, but for her, it was only 2 years. However, that only accounts for 48 years of the difference. What's with the other 2 years?
TL;DR: (UPDATED MAJORLY!!!)
- Out of universe, Card explicitly admitted to "the details and the timeline are not exactly right" in Ender's Game Chapter 15.
- In universe, most likely reason is simply that people talking about the flight to Shakespeare were rounding things down from 52 to 50.
- A second plausible in-universe explanation was that both Ender and Valentine were meant to spend those 2 years in stasis, as did most other passengers. Ender chose not to, but Card didn't know that till he wrote follow-up stories (Ender in Exile, to be specific). So, Valentine should have been 50 years older than Peter, with no "-2 years for inflight time" adjustment.
- Also, in Ender in Exile, Card changed the trip time from 50 years to 40 years.
First of all, in "Ender in Exile" afterword, Card very explicitly establishes that he had timeline errors in Chapter 15 of Ender's Game:
Except for one tiny problem. When I wrote the novel Ender's Game back in 1984, my focus in the last chapter, chapter 15, was entirely on setting up Speaker for the Dead. I had no notion of any sequel between those two books. So I was rather careless and cavalier with my account of Ender's time on the first colony. I was so careless I completely forgot that on all but the last formic planet, there would have been human pilots and crew left alive. Where would they go? Of course they would begin colonizing the formic worlds. And those who sent them would have at least allowed for that possibility, sending people trained to do whatever jobs they anticipated would be necessary.
So while the meat of chapter 15 of Ender's Game is exactly right, the details and timeline are not. They aren't what they should have been then, and they certainly aren't what they need to be now. Since writing that chapter, I have written stories like "Investment Counselor" (in First Meetings), where Ender meets Jane (a major character in Speaker) when he is legally coming of age on a planet called Sorelledolce; but this contradicted the timeline stated in Ender's Game. All in all, I realized, it was chapter 15 that was wrong, not the later stories, which took more details into account and developed the story in a superior way.
Here's the full chronology from the "Ender's Game":
We know that at the start, Ender and Peter were 4 years apart:
Right after Ender lost his monitor, we are told that Peter is 10 and Ender is 6:
Ender did not see Peter as the beautiful ten-year-old boy that grown-ups saw, with dark, thick, tousled hair and a face that could have belonged to Alexander the Great.
But Peter would not be soothed. "Like us? He keeps the little sucker till he's six years old. When did you lose yours? You were three. I lost mine before I was five. He almost made it, little bastard, little bugger."
Then, when they decide that Ender doesn't return back to Earth and Valentine joins him, he's 12 and she's 14:
When the colony ship was about to embark, Ender was 12 (making Peter 16) and Valentine was 14:
"He's only eleven. Twelve, now." (Graff+Anderson, discussing Ender after Graff's trial ended).
"You're telling everyone that you're Demosthenes? A fourteen-year-old girl?" (Ender to Valentine when she joins him).
We know that they said the trip would take 50 years Earth time and 2 years relativistic time.
"We're only telling them that Demosthenes is going with the colony. Let them spend the next fifty years poring over the passenger list, trying to figure out which one of them is the great demagogue of the Age of Locke." (Valentine to Ender)
"The buggers were all dead fifty years before we got here." (Ebra to Ender, when discussing the Giant buggers built for Ender).
"It's fifty years to get there--"
"Only two years if you're aboard the ship." (Ender and Valentine)
Here's the important part - these are all basically colloquial conversations. So it's quite plausible that the trip actually took 52 years, but they rounded down to 50.
Then, it took 8 years for Ender to govern the colony till he found the Giant buggers built for him and communicated with the Queen:
He took one of the children along, an eleven-year-old boy named Abra; he had been only three when the colony was founded, and he remembered no other world than this.
This means that Ender would be 12+2+8=22 years old when he wrote Speaker for the Dead, as it was only weeks later. That'd make Valentine 24.
Weeks later he came to Valentine and told her to read something he had written; she pulled the file he named from the ship's computer, and read it.
Then, when Valentine was 25, the 77 year old Peter contacted her by Ansible:
When Valentine was twenty-five years old, she finished the last volume of her history of the bugger wars. She included at the end the complete text of Ender's little book, but did not say that Ender wrote it.
By ansible she got an answer from the ancient Hegemon, Peter Wiggin, seventy-seven years old with a failing heart.
And, here's the amended chronology from "Ender in Exile":
The voyage was now officially 40 years, not 50:
Ender knew that making him the nominal governor of the colony was a joke. When he got there, the colony would already be a going concern, with its own elected leaders. He would be a thirteen-year-old—well, by then a fifteen-year-old—whose only claim to authority was that forty years before he commanded the grandparents of the colonists, or at least their parents, in a war that was ancient history by then.
"Who knew that fairies sweat so much?" Alessandra pulled one of Mother's dripping locks of hair away from her face. "Oh, Mother, we won't do well in a colony. Please don't do this."
"The voyage takes forty years—I went next door and looked it up on the net." (Dorabella to Alessandra)
"And everyone we know on Earth will be forty years older than we are."
"It will be as if our bodies slept a week, and we wake up forty years away." (same chat)
I believe that the powers-that-be think that having a child of thirteen appointed as governor of your colony might hurt morale among your colonists, though it will be forty years before I arrive. At the same time, others think that having the victorious commander as governor will help morale. (Ender's letter to Admiral Kolmogorov)
I would do the same for Admiral Morgan, since there is a chance that he will actually be in control—the soldiers on your ship will answer to him, not you, and the nearest law enforcement is forty years distant if he should choose to illegally deploy them on our planet's surface (Kolmogorov's letter to Ender)
So easy to deceive you or leave you ignorant—something that I will keep in mind when I receive information from ColMin as governor 40 years from now. Unless I can get them to change this foolish practice before I depart. (Ender's letter to Admiral Kolmogorov)
"But I can't," said Dorabella, and now she was openly teasing. "In this starship we fly for fifty years!"
"Forty years," said Ender.
"Two years," said Alessandra.
So it was that the plan was conceived for a play reading in the theater three days later—days by ship's time, though the whole concept of time seemed rather absurd to Valentine, on this voyage where forty years would pass in less than two
"There's no throne," said Ender. "It solves a lot of problems for me, don't you think? It was going to be tough for a fifteen-year-old kid to lead a bunch of colonists who've already been living and farming on Shakespeare for forty years by the time I get there
I realize that for you, more than forty years have passed; for me, that battle was only three years ago, and has never been far from my thoughts. (Ender's letter to Dr. Menach, Governor Designate)
The first order of business would be docking with the transport ship that had brought the war fleet here to this world forty years before.
Those [formics] feet had trodden here, though it was forty years before.
"So these gold bugs are still alive, forty years after the formics stopped bringing them food? How long is the metamorphosis?"
"Excellent," said Morgan. "We'll have marines there in case these people are planning some sort of resistance—you never know, all their cooperation might be a ruse. Four decades on their own here—they might resent the imposition of authority from forty lightyears away."
"I bet they brood about it every day. 'What ever happened to that rude girl Alessandra, who left us without saying good-bye—forty years ago.' "
(Yes, Card is pretty intent on clarifying that the new official timline is 40 years. The only mention of 50 is by Alessandra's mother Dorabella - and even she knew the correct figure from earlier quote).
UPDATE: I found the official canon explanation for 40/50 year difference in "Ender in Exile".
In one of the letters from Ender (from the ship) to acting colony Governor Vitaly Denisovitch, he says:
And, so you know, the voyage will not take fifty years, but closer to forty—refinements have been made in the eggs that power the ships and in the in-ertial protection of the ships, so we can accelerate and decelerate faster in-system and spend more time at relativistic speeds. We may have gotten all our technology from the formics, but that doesn't mean we can't improve on it.