Hai,
You are only thinking one side. Sanskrit is way back older than Tamil.

If you speak a different language like Latin or Greek, you will understand that.

Everyone is thinking about only the Sanskrit influence on Tamil.

Sanskrit was actually started using from 4000 BC
Before that people spoke prakrit.

Beginning of Tamil was in 300 BC. when a lot of Brahmins came to Tamil Nadu and Kerala in 350 AD,they merged their language with Tamil forming Malayalam in 500 AD.

Check the old writings of Roman Historian Pliny why a lot of people came to South around 400 AD.
Pliny's writing "Muziris primun emporium Indiae".

Which means "Muziris the major trade center of India". Muziris is considered to be near to a place named Kodungallor in Kerala.

Believe or not, Sanskrit is the mother language of all languages that spoken after 3000 BC including Tamil.