The Song of the Broad Axe wrote:
Q20 - Here you are using five years (but calculated semi annually) to find the value of the liability. This is where 10 periods comes from. Notice the interest rate used is 3%, or half of the stated minimum acceptable return. The initial value of the bond is given in the problem.
To calculate the safety margin, subtract the PV of the liability discounted using the minimum required return from the PV of the portfolio (in this case a $100 million bond).
Q21 - In this problem one year has passed and we are asked to recalculate the safety margin. The time has gone from 20 to 18 because the ten year bond pays semi-annually, hence 20 initial periods declining to 18 after one year.
The difference between q20 and q21 is the liability is for 5 years while the bond is a 10 year instrument.