Couple ways to get the answer. 1. sensation of the anterior thigh and medial leg are by branches of the femoral nerve (L3, L4, L5). 2. Since the anterior thigh is affected the platellar reflex is likely affected which is a branch of L4.
Classic FA Mnemonic:
S1-S1 Buckle my Shoe (foot)
L3-L4 Kick the Door (leg)
C5-C6 Pick up Sticks (bicep)
C7-C8 Lay them Straight (tricep)
I know it's a reflex mnemonic, but it's served me well in these sorts of questions.