0.6, 20 for data, 0.2, 8 for ALU and 0.2,12 for branch.

So total cycles = 0.6*20 + 0.2*8 + 0.2*12 = 12 + 1.6 + 2.4 = 16 cycles.

After the CPU is improved, CPI is 0.4*1 + 0.6*20 = 12+ 0.4 = 12.4 cycles.

So the speedup should be 16/12.4 which is 1.29.

Note: CPI = 1 for improved CPU in the question doesn't make sense. It must be a typo, I guess.