How do I handle such a situation? Should I inform my boss that it is
my colleague's responsibility to complete the work? Or should I tell
this colleague to finish the work? Or should I just resign and go to
another company? Or what should I do?
You couldn't read the situation any wronger if you tried.
Your colleague messed up. Your boss doesn't think that your colleague can fix the situation. He desperately hopes that someone can fix it, and the person he hopes can fix it is you. This is your opportunity to be to be the hero who saves the day and gets the eternal gratitude of his boss (well, slightly exaggerated).
Instead, you want to inform your boss that it is your colleague's responsibility to finish the work? Your boss knows that. He knows it's your colleague's responsibility but he is not up to the task. The boss just took the responsibility away from your colleague (which is a huge reprimand for your colleague) and gave it to you. The boss gives you the opportunity to shine and you refuse? How stupid is that.
Should you tell this colleague to finish the work? If you do, and he fails, and your boss already expected that he would fail and therefore gave the job to you, then the failure is absolutely down to you.
Should you resign? Your boss just gave you the opportunity to be the hero for the company and save the day. Absolutely, that's a good reason to resign. (That's sarcastic in case you don't realise).
What you should do: Do the job. Keep the deadline. If there are things you need to drop, tell the boss what you will drop to keep that deadline. And at the end you will come out of it smelling of roses while your colleague is in the dumpster.
In every job, there is work, and there is opportunity to shine. These opportunities to shine can be rare, and you need to take advantage of them. You seem to be fixated on avoiding the work, so fixated that you can't see the opportunity. In the next year you will do twenty different tasks where your boss will at best say "he did his job". Now there is one task that allows you to shine, where you boss will say "he saved the day" if you succeed, and you want to get out of your way to avoid it.