A swap value is the difference between the two leg values.
highlighted = computed this step
Present value of the fixed leg
The fixed leg at 5% has present value notional times fixed rate times the sum of discount factors. The sum of discount factors is 27/10, so the fixed-leg present value is $13.50.
PVfixed=N⋅Kt=1∑ndt
Present value of the floating leg
The floating leg has present value notional times one minus the last discount factor. Since the last discount factor is 21/25, the floating-leg present value is $16.00.
PVfloat=N(1−dn)=$16.00
Value to the fixed payer
Value to the fixed-rate payer is floating-leg present value minus fixed-leg present value. At the fixed rate 5%, the value is $2.50.