It depends on your DR and that of the other drivers. Finish position is all that counts, where you start is irrelevant.
DR is a point exchange system, you take points from drivers you finish in front of and give points to those that finish ahead.
Base starts at 80 points per driver, so finishing 8 of 18 you lose 7x80 and gain 10x80.
However the difference between your DR and the driver you give/gain points from matters.
The difference between yours and their DR varies the amount by 80 points, the actual amount you gain/lose is 1 to 160 points per driver.
For every 500 DR points difference you get an extra point if the DR of the driver you beat is higher than yours.
For every 500 DR points difference you lose an extra point if the DR of the driver you finish behind is lower than yours.
SR doesn't matter, you said DR of other players varied from E to C.
DR.A+ runs from 50k to 75k
DR.A runs from 30k to 50k
DR.B runs from 10k to 30k
DR.C runs from 4k to 10k
DR.D runs from 0k to 4k
DR.E means you have not yet completed 5 races, they don't count. You don't get actual DR points until completing your fifth race.
If your DR is DR.B at 20K and you finish behind a DR.C driver with 5K, you lose 80 + (15,000 / 500) = 110 points to that driver
If your DR is DR.B at 20K and you finish in front of a DR.C driver with 5K, you gain 80 - (15,000 / 500) = 50 points from that driver
If your DR is DR.B at 20K and you finish behind a DR.A driver with 40K, you lose 80 - (20,000 / 500) = 40 points to that driver
If your DR is DR.B at 20K and you finish in front of a DR.A driver with 40K, you gain 80 + (20,000 / 500) = 120 points from that driver
It depends on the other people in the room how high you need to finish to gain DR. If you are the only DR.B in a DR.C to DR.D room, you probably have to finish top 5 or top 3 to gain points. A lower rated driver finishing ahead of you takes away a lot of points, while you gain little from beating them.
Your next question is likely where do you find out your DR
https://www.kudosprime.com/gts/stats.php?profile=search