Following are my two approach -
First Approach:
$10^{9}$ * 20% = 2 *$10^{8}$ will be executed in non-pipelined mode.
$10^{9}$ * 80% = 8 * $10^{8}$ will be executed in pipelined mode.
so according to formula, Total execution time = pipeline mode + non-pipeline mode
$(2 * 10^{8})$ * 3 * 1ns + $[5 + (8 * 10^{8}) - 1]$ * 1ns = 1.4 sec + 4ns
so I can neglect 4ns & hence ans is 1.4 sec
2nd Approach:
Total time = New CPI * cycle time * Instruction count
New CPI = ( Old CPI + stall-rate*stall-cycle)
so, total time = (1+ 0.2*2) * 1ns * 10^9 = 1.4 sec