Im not sure about this question, but since no one else has replied i'll have a go. Your notation is a bit different to the one i was taught, so i have made the following assumptions:

3% Bond: I assume this is redeemable at par at the end of 5 years

"Yield": I assume that this is the internal rate of return on your 3% bond

areplicating portfoliois one that has the exact same cashflows as the one we are interested in.

The cashflows for the 5% government bond (redeemable at par = $10m) are as follows:

Year 1: 500k

Year 2: 500k

Year 3: 500k

Year 4: 500k

Year 5: 10500k (i assume you get your coupon in year 5 as well)

Year 6+: 0

Step 1: Replicate the coupon payments

We need to replicate these cashflows using a bond that has a coupon of only 3%

To get the required coupon in the next 5 years we need

0.03X = 500,000

X=16.6m

So we have to buy 3% bonds with a total par value of $16.6m

However, we dont want any coupon payments After at the end of year 5. because these are 10 year bonds, we have to sell them at the end of year 5. To do this, you will need to write aforwardon your bonds.

Your question does not specify the forward price structure of your bond market, it only says the yield on your bond is 4%. If we assume that is the constant yield over all durations, we get the forward price as:

(ie, $13.64m)

So, our replicating portfolio now looks like:

16.6m of 3% bonds

a forward to sell the bonds for $13.64m at the end of year 5.

Step 2: replicate the Redemption payment

We have almost finished, the only problem is that we haven't replicated the redemption payment of the portfolio ($10m). Our replicating portfolio from step 1 has a lump sum payment of $13.64m. To get the $10m we need a negative cashflow of $3.64m at the end of year 5.

However, we already have an instrument to do this, our 3% bond! We know this yields 4% total, so you must have:

So, our final replicating portfolio is;

3% bonds with a par value of $16.6m - $2.99m = $13.61m

a forward to sell $16.6m of bonds at year 5

Once again, i am not very confident about this answer! I've only added it as no one else has posted anything.