but if Richard isn't a time traveler then how come he is the same age when locke was born and then when he tested him?
I think the general consensus has been that
Richard just doesn't age, but that we just don't know why. Maybe none of the island natives do. Maybe they live forever (or at least hundreds of years). Which is why the population of "others" can be maintained even though they can't have children.
Maybe Locke goes WAAAAAAY back in time before Richard ever became aware of Lockes existence. OOh maybe that's HOW Richard becomes aware of his existence.
Either that or just after Richard visits Locke as a child.
Remember that when Richard visits the child Locke "he tested Locke by presenting him with a baseball glove, a book of laws, a vial of sand,
a compass, a comic book, and a knife. Locke was asked to identify which of these items were "already" his.
Richard was pleased when Locke chose the compass and vial of sand, and smiled slightly as the child considered the book, but Locke ultimately chose the knife." (from lostpedia).
I think the timeline looks somethings like this:
1)
Locke is timeshifted back to the early 50s. (It might have already happened. Don't you think that the uniforms and weapons of the soldiers that Juliet, Sawyer and finally Locke were fighting looked like they were WW2 era?). Locke tells Richard to help him in the (very) distant future with his wound.
2)
Locke meets Richard for the "first" time (keeping in mind that Richard doesn't age). Using the compass to prove who he is (somehow).
Richard visits Locke as a baby in 1956 then again as a child in 1961 where the compass is one of the items shown to him.
3) [Pre-Oceanic 815 Crash, but Post-Dharma genocide and Ben's takeover]
Locke appears before Ethan who then confronts him. Ethan would obviously tell Richard about this encounter (confirming what Locke told Richard in the "past").
4) Oceanic 815 Crashes, events of season 1 to 4 take place, Locke takes over the others.
5) Ben turns wheel, things go nuts,
Richard watches the crashed plane sight for the "foretold" appearance of the wounded Locke.
As I said earlier, points 1 and 2 could be reversed and it would all still work.