During intervertebral disc herniation compression of which root results in paresis of muscles involved in lifting the foot?

We don't give exam answers here.

They are talking about a foot drop. So you should know the nerves involved in that. It can occur at different levels but they asked specifically at the spine.

And, imagine if you were doing a neuro exam and you had a subtle finding of weakness in dorsiflexion in one foot, what would you think is the issue?

In real life, you would have time to look it up if you forgot, but for med school & exams they'd want you have that kind of thing memorised.
Can you please tell me a good book where I can read about it?

Thank you for your answer, but I don't have much knowledge. I just know that it is foot drop, why L5, I don't get it, the other answer choices are part of lumbosacral plexus, too.
Each pair of Spinal Nerves.

Each pair of spinal nerves controls some specific muscles. L5 happens to control lifting of the foot among others
If you search foot drop herniated disc you'll see that L5 radiculopathy is mentioned and the other nerve roots aren't really.

You could even search 'L5 Foot drop anatomy' for more specific results.

You could also search "Myotomes of the lower limb".

I guess a lot of myotome diagrams show L4/L5 for dorsiflexion of the foot, but I guess, at least you'll have it narrowed down to a 50/50 chance in the exam.