You need to calculate the terminal loss 12 months back from the date of cessataion.
It means 9 month of current year + 3 month of prior year. Then you need to add the overlap profits. This would give your around 18K as terminal loss to be set off against prior year.
Please let me know if you need any further information.