How does Oedipus' answer to the Sphinx's riddle foreshadow Oedipus' own life?
When Oedipus arrives in Thebes, the town is being persecuted by the Sphinx. She will not leave until someone solves her riddle:
"What goes on four legs in the morning, on two legs at noon, and on three legs in the evening?"
Oedipus answers the riddle--a child crawling, a young man walking, and an old man using a cane--and the Sphinx slinks away to die. Of course, this is where the future king's trouble begins; and the riddle is actually a bit of a metaphor for the major events which mark Oedipus' life.
His first months of life were quite traumatic. He is prophecied over before he's even born to his royal parents, then he is spiked through his feet and supposedly left for dead. Instead, of course, he is rescued by a couple of shepherds and becomes the son of another king. This is the early phase of his life--and it is the foundation for everything which is to come. I know that's true for all of us, but his is a truly unique set of circumstances.
The middle years of his life are a mixture of good and bad. He tries to escape the destiny predicted for him by the Oracle at Delphi, then he ends up unknowingly doing exactly what was predicted. He lives a seemingly wonderful life--married to a queen, father of four, king to a people who love him. Then it all changes.
Like the old man leaning heavily on his cane in the riddle, Oedipus is figuratively crippled later in his life by the revelation and realization of his sins.
The riddle is not an exact picture of Oedipus' life journey, but the metaphor does have some application.