How long was Odysseus traveling before he landed on the beach of the kingdom of the Phaiakians?
The Trojan war lasted ten years, and then it took Odysseus another ten years to reach home. So, he was in Phaeacia after having traveled for very close to that ten years' mark; we know this since Phaeacia was his final stop before reaching Ithaca.
During this ten years, however, he's been quite a few places: first, it was Ismarus, where his men stopped to celebrate their win in Troy. They drank too much and were set upon by the Ciconians; Odysseus lost six men from each ship there. Next, they made port in the land of the Lotus-eaters, staying only a brief time. After this, they traveled to the land of the Cyclopes, and they had their terrible run-in with Polyphemus, son of Poseidon. Next, they traveled to Aeolia, where Aeolus, the keeper of the winds, lives. He gave Odysseus a sack containing all the winds which would blow him away from home; this way, only the wind which would blow him toward home is left. However, his men open the sack when they are within sight of Ithaca, thinking the sack contains some treasure that Odysseus is hoarding, and their ships are blown all the way back to Aeolia. Aeolus will no longer help him believes he believes Odysseus to be cursed by the gods. After this, it is on to Laestrygonia, a land full of terrible giants that eat men; the giants threw stones at Odysseus's ships and only the one he was on made it out. All the other ships were sunk. Next, his ship travels to Aeaea, the island where Circe lives. His crew stays, feasting, for one year. After this, they travel to the land of the dead, the Underworld, in order to get advice from Teiresias, the prophet, about how to get home. From here, he arrives at Calypso's island and is held by her, as her lover, for several years until the gods force her to let him go. This is when Odysseus finally makes it to Phaeacia, almost ten years after the war ended.