Stray means out of place and alone, which means that the puppy could just be lost (not necessarily that it doesn't have a home). Homeless, on the other hand, means without a home, but not necessarily alone.
Answer: The words are synonyms because they have a similar meaning, but are slightly different.
you could say something like through out the years people have said Ambition and revenge are always hungry but... or you could say He who seeks revenge should remember to dig two graves