The payback period is essentially the duration in which it takes the initial investment to be recovered.
For Project A, the initial investment equals $100,000. As such, within a three year period, 96,000 will be recovered (32,000 x 3) The amount remaining is 4,000 (100,000 - 96,000). This will be recovered in the fourth year. In order to recover the remaining amount, it will take an additional .125 years (4,000/32,000). Accordingly, the total payback period is 3.125 years.
For Project B, there is a $100,000 initial investment and no recovery until the fourth year. In the fifth year, we receive $200,000; therefore, half of the fifth year is required in order for the $100,000 to be recovered. As such, the total payback period is 4.5 years...