Making some assumptions here:
Assuming the 2017 model sold for approximately $1300 and the 2019 model sold for $2000 and that they would depreciate by 30% per year (recalling from my small office/salvage for insurance rates) - the 2019 model is more appropriately priced.
Factor in that the 2019 model is a bigger screen, more memory, and has the touch bar, you probably have the better deal with that one. The fact that there is damage - even if it doesn’t affect performance - should give you a negotiation point. Especially if you have to ship it as well.
This is just my rough assessment. Take it with a grain of salt and factor in what you feel comfortable with.
It’s worth considering that both will have the butterfly keyboard. There is a repair programme but that only lasts for (I think) 5 years after it was first purchased. The later model will have a more resilient keyboard (but still a butterfly keyboard).
What do they want to do with the laptop? Will a new MacBook Air not be a better choice?
As @geoffaire implied (and I will state explicitly) I wouldn’t buy any laptop with the butterfly keyboard. And I would not pay $850 for a used machine when the current 13-inch Air is available for about the same price.
The primary thing to consider is CPU power. Check especially whether you are getting an i5 versus i7 (versus i9) CPU. Then check the CPU cycle rate.
The next consideration is RAM. Larger is always better.
The final thing to consider is hard drive storage. Again, all else equal, larger is better. This can be supplemented by external USB drives, so the concern may be a wash.
In either case, ask about the battery specs. Have the seller provide a report from battery monitoring apps (e.g. current number of cycles, projected lifetime).
I consider screen size and keyboard size as secondary issues because you can always add a second monitor or an external keyboard if you are so inclined.