I have excluded NI from this calculation..
Tax from you salary should be:
£12,570 tax free + £37,700 * 20% = £7,540 +(£58,772 - £50,271) x 40% = £3,400.40 = Total £10,940.80 but the tax paid under PAYE appears to be £9.793.20 so you will still need to pay HMRC £1,147.60 on your salary.
(Probably you had a pay rise during the year or a bonus and your employer had only deducted circa. 20% tax???)
Tax from your Freelance work:
Taxable £15,910 * 40% = £6,364 LESS SIPP deduction is the actual contribution £12,728 / 80% - £12,728 = £3,182 Total tax payable £3,182 but you have (£15,910 freelance work - £12,728 SIPP contribution by you) = £3,182 cash left over from your freelance work to pay this tax.
Tax Payable:
Total tax payable for the year £1,147.60 tax Salary + £3,182 tax Freelance work = £4,329.60 (but you still have £3,182 cash still have from freelance work). So this is as per your analysis result £4,486 but including NI.
So…..
Freelance work: cash £15,910 - SIPP contribution £12,728 = £3,182 cash available which you will pay to HMRC for tax on Freelance work (above) = £nil cash left from Freelance work
SIPP contribution £12,728 + SIPP Govt Contribution £3,182 = Total SIPP £15,910 which is the same as your Freelance remuneration
But ..... you still have to find the amount of tax which was not deducted from your salary as PAYE and the small amount of NI on freelance work.