The exact solution lies here:

Avg. Access time = Page hit ratio ( Primary access time ) + Page miss ratio ( Primary access time + Secondary access time)