The first sentence is correct. We don’t need to add a second “the” in the second sentence. However, the following version is also correct if you want to add a second “the”:
I can't do the fourth question and the fifth question but I have done all the others.