Interesting Question ,
First of all lets understand the concept here
We have three memory source cache , primary memory , secondary memory ( hard disk / virtual memory)
So for accessing any data CPU must look in cache first if it is cache miss then primary memory if primary memory miss then secondary memory or say virtual memory.
hence effective access time = cache hit ( cache access time ) + cache miss ( cache access time + primary hit ( primary access time ) + primary miss ( primary access time + virtual memory access time ))
So if you would solve as per above you would get
access time = 10025 ns
but normally we ignore the cache access time when there is cache miss as it is very small as compared to primary access time and virtual memory access time similarly when there is primary miss we ignore the primary access time as it is very small compared to secondary access time
So overall our new formula becomes
effective access time = cache hit ( cache access time ) + cache miss ( primary hit ( primary access ) + primary miss ( virtual memory access t))
=.8( 5ns) + (.2 ) ( .995 * 100 ns + .005 ( 10000000 ns ))
=10024 ns exact