Dealing with percentages can be counterintuitive so let the program has 100 instructions, then it has 30 branch instructions.
The effective time taken by each instruction in X1 and X2 due to pipelining is 1 Cycle, without any pipeline hazards. CPI is 5 without pipelining. But Pipeline hazards are created by branch instructions (only) in both processors.
In X1, 70 instructions take 1 Cycle since CPI = 1 and another 30 instructions take 3 Cycles (Here an extra 2 is added to 1 for each branch instruction because of the 2-cycle stall caused by every branch instruction)
So for executing the program P with 100 instructions, the time taken by X1 is (70 * 1) Cycles + (30 * 3) Cycles = 160 cycles.
Therefore effective CPI (cycles per instruction) with X1 = 160/100 = 1.6
In X2, 70 instructions take 1 cycle. 80 percent of 30 instructions, i.e, 24 instructions take 1 cycle because BPU of X2 has a prediction accuracy of 80%. And 20 percent of 30 instructions, i.e, 6 instructions take 3 cycles. (since BPU prediction goes wrong for 20% of the instructions).
So for executing the program P with 100 instructions, the time taken by X2 is (70 * 1) Cycles + (24 * 1) Cycles + (6 * 3) Cycles = 112 cycles.
Therefore effective CPI (cycles per instruction) with X2 = 112/100 = 1.12
Speedup Factor = (N1 * C1 * T1 / N2 * C2 * T2) = 1.60/1.12 = 1.428… = 1.43 (rounded off)
Here N1 = N2 = 100, T1 = T2 = 1/(2 GHZ)
C1 = CPI of X1 and C2 = CPI of X2.