Branch penalty is 2 ,beacuse the target address we are getting in 3rd stage.
80% are unconditional branches , ie we have to jump there , and there is no time needed to calculate the target address.
// ie. no stalls.
For 20%, the branch penaly is 2.
Speed Up = No. of stages/ (1+ (branch penalty)*(% of conditional branch instructions))
=4/(1+2*0.2)=2.857=2.86
// Here we are ignoring the cases, where branch is not taken. We are assuming for all 20% conditional instrustions, branch is taken.