Given,
Avg Memory Access time = (Hit in L1) * (L1 time) + (miss in L1 * Hit in L2) * (L1 time + L2 time) + (miss in L1 * miss in L2 * Hit in main memory) * (L1 time + L2 time + main memory time)
= (1-0.15) * 5 + (0.15 * (1 – 0.20)) * (10 + 5) + (0.15 * 0.20 * 1) * (85 + 10 + 5)
= 9.05ns
OR
Avg Memory Access time = L1 time + (miss in L1) * (L2 time) + (miss in L1) * (miss in L2) * Main memory access time
= 5 + 0.15 * 10 + 0.15 * 0.2 * 85
= 9.05 ns
Note: As the question is not mention which access method is used, we use the simultaneous method (By default)