Hi Veenu!
Let's simplify the question a bit first.
If I have to answer 8 out of 10 questions (with no restrictions), and the order in which I'm answering doesn't matter (and it doesn't seem to here), then the question is just a combinatorics question: how many ways can I choose 8 things out of 10?
But we DO have a restriction here, so let's explore the various scenarios. (I'm assuming here that the student will answer EXACTLY 8 questions, not 8, 9, or 10.)
SCENARIO 1:
I answer exactly 4 of the first 5 questions. In this case, I have to also answer exactly 4 of the OTHER 5 questions. So there are (5! / 4!) or 5 ways to pick 4 of the first 5, and (5! / 4!) or 5 ways to pick 4 of the remaining 5. That means I have 5 * 5 = 25 ways to answer my 8 questions.
SCENARIO 2:
I answer all 5 of the first 5 questions. In this case, I have to answer 3 of the remaining 5 questions, and there are (5! / (2! * 3!)) ways of doing that, or 10 ways. Since this is the only variable in this scenario, this is my answer: 10 ways.
These are my only two scenarios, so I have 25 + 10 or 35 total ways of answering exactly 8 questions, given the restriction that I must answer 4 of the first 5.