Hmmm, interesting situation. There's morals, ethics, and of course, the "right" thing to do.
If a familly member sold you the car back in '13, before the scandal was known, I don't see what their issue is. Let's say the scandal never occurred, and gas prices shot up to $8.00 a gallon. Your little TDI would most likely be worth a lot more in that kind of market. If you decided to sell it at a profit from your 2013 price, would this relative expect some money back? Probably not.
The car was 4 years old when you bought it, and I assume your buyback was a bit more than you paid. Ultimately, it's up to you. If it was a close family member that could use the money, perhaps you could give them half of the overage. Afterall, if they were an eligible seller, having sold after the scandal was exposed, but before 6/27/16, they would have been eligible for half of the restitution amount.
Ethically, you don't owe them anything. Morally you don't owe them anything, afterall, they sold you, albeit unknowingly a non-emissions compliant vehicle. And the "right" thing to do is whatever your heart tells you at this point. I think sharing up to half of any "profit" you made would be a nice family gesture given they sold the car to you at a discount originally. However, if you had to put any money into the car for repairs and maintenance, I'd subtract that amount too.
I'm curious, lets say the car had a serious issue 3 years after you bought it. Would this family member help you pay to fix it? Probably not. Personally, I think your family member is the one with the issue and shouldn't be trying to cash in on your gain.