Let's see:
1. McDavid is 1.5 years younger
2. McDavid has 2 art ross in 3 years (may have won in year 1 if not for injury, was within pace).
3. MacKinnon has played fantastic last year (McDavid still better) and this year (McDavid still better) - yet before that his consistency was very troubling. Some disappointing years. He's great right now, but looking long-term consistency, it's harder to project based on his early struggles.
4. McDavid is signed for 3 extra years. You're guaranteed to have him for at least 3 extra years than MacKinnon, since UFA is always a bit of a gamble.
5. (This is by far the most important one) You can do less than you think with 6M$ in cap space. As a Habs fan I can confirm that first hand - we've had ~10M$ in extra cap space 2 years running. There's no 6M$ UFA you can sign that grows on trees that 'makes up the difference between MacKinnon and McDavid'.
Bottom line - pick the better player, the one more likely to keep on getting better and widening the gap, the one more likely to remain better longer based on age, the one more likely to remain consistently better based on past track record, and the one that is signed longer and you're guaranteed to keep for more years upfront.
No brainer.