There are 500 memory references and there are 2.5 memory reference/instruction hence there will be
x*2.5 = 500;
x=$ \frac{500}{2.5}$ = 200 instructions.
No. of memory stalls = Miss in L1* Miss Penalty L1 + Miss in L2* Miss Penalty L2
=50*20 + 20*100 = 1000 + 2000 = 3000 memory stall cycles
No. of stall cycles/instruction = $ \frac{3000}{200}$ = 15
Reference: https://gateoverflow.in/21135/q26-ch-5-m_e-workbook
Second Method:
no. of memory stalls/ memory reference: Miss in L1* MissPenaltyL1
Miss Penalty L1 = Hit Time L2 + Miss in L2*MissPenaltyL2
no. of memory stalls/memory reference =$ \frac{50}{500}*( 20 + \frac{20}{50}*100 )$ = 6
Avg. stall/ instruction = (no. of memory stalls/memory reference)*memory reference/Instruction
= 6*2.5 = 15
Hence, 15 is correct answer!