In ancient Greece and in ancient Egypt there were cities named Thebes. Since the languages involved were completely different, how did these cities end up with the same name?
The Egyptians didn't call it Thebes, their name for the city was Waset, later Ta-Pe and later still Niwt-Imn. Thebes is the Latinized form of the Greek Thebai, the hellenized form of the Demotic Egyptian Ta-pe.