Only the first is grammatical.
If you omit 'to' from the second they would mean the same.
* * *
Please note that a better title would have been Why don't you do your homework?
Extract from the Posting Guidelines:
'Thread titles should include all or part of the word/phrase being discussed.'
Student or Learner