Homer is older than Sophocles. Homer is traditionally considered to have lived around the 8th or 7th century BCE, and he is credited with composing epic poems such as the Iliad and the Odyssey.
Sophocles, on the other hand, lived later, around the 5th century BCE, and is best known for his plays like Oedipus Rex and Antigone. The works of Homer laid the foundations for Greek literature, and they were an influential presence long before Sophocles wrote his tragedies. Therefore, we can conclude that Homer predates Sophocles by several centuries.