Spock served with Pike for 13 years. After that, Kirk took over command of the Enterprise from Pike. All of this happened prior to Kirk's first appearance in "Where no man has gone before".
You're close

. Spock said he served with Pike for a little over 11 years (eleven years, four months, and five days -- in Spocks words). The 13 years you may be thinking of was the time between
The Cage and
The Menagerie.
I'm thinking Spock came on board sometime just prior to the events in
The Cage.
It's never been fully established in TOS when Kirk exactly got the Enterprise, I think. I haven't watched every episode of TOS yet. Seen most of them, but not all. I have seen The Cage, but was Kirk in that episode or did he not appear until "The Man Trap"?
Darkshadow --
Even though
The Man Trap was the first Star Trek episode to air, the general concensus is that
Where No Man Has Gone Before (or WNMHGB)was 'chronologically' earlier (in a Star Trek universe sense of the word) than
The Man Trap, but was shown out of order.
WNMHGB was the second pilot episode made (after
The Cage, which incidently was
never shown on TV until the 1980s -- although we saw most of it in
The Menagerie. So people back in 1966 never saw nor heard of Chris Pike when
The Man Trap aired.). Even though WNMHGB was the pilot episode, NBC felt that
The Man Trap would be a better episode to air as the first one, since it was (in their opinion) more about "seeking out new life..."
So even though
Man Trap aired first, it is widely accepted that WNMHGB happened earlier (some say possibly 6 months to a year earlier in "Star Trek time".