Let average clocks for non-pipelined instruction be x
Let each clock takes 1ns
Time to execute one non-pipelined instruction is (3+8+5+6+4) = 26 clocks
and it is given that each instruction takes x clocks, so Time to execute one non-pipelined instruction is 26*x
Time to execute pipelined instruction is 1 clock = 8ns
speedup = Tnon-pipelined / Tpipelined
4 = 26*x/8 => x = 1.23