The correct answer is
Both groups are descendants of the first inhabitants of nearby Afghanistan
They do have different languages called just like their ethnic groups, and the Sinhalese do practice Buddhism, mostly Theravadda kind, while the Tamils are a Hinduism group. They don't come from Afghanistan and are Indo-European.