The answer given deducts 13981 calculated in cell M60 from the end of the accumulated amount of 50000. However, this 13981 is the end of year loan outstanding in year 9 instead of year 10. Shouldn't we deduct the end of year loan outstanding in year 10 which is 9540.9 from my calculation instead?
If you're referring to the IFoA solution spreadsheet, the value of -13,982 definitely applies at time 10 (ie at the end of year 10). It looks like your -9540.9 comes from running the simulation for one too many periods. Make sure you start with -50,000 at time zero rather than time 1 - might that be it?