She probably answered a question wrong. How much is on 1040 line 5b. Did she get the same taxable amount on 1040 5b as 5a for the 401K withdrawal? And she should have a 10% Early Withdrawal Penalty. The 10% Early Withdrawal Penalty is on Schedule 2 line 6 which goes to 1040 line 15
Then you get credit for all the withholding taken out on 1040 line 17.
We can't see anyone's tax returns on this forum so we really need more information.
In general, if you take an early withdrawal from a 401k, some tax will be withheld. This is only an estimate of the tax you might owe. When you file your return, your income tax is calculated and if you owe more than the withholding, you have to pay, and if too much was withheld, you get a refund.
It sounds like you are saying your mom had $15,000 withheld, she got a full refund, and now the IRS says she owes $18,000. The IRS is not always correct, although they usually probably are correct.
Someone would have to look at your mother's tax return and determine if the 401k withdrawal was reported as taxable income, and what her other taxable income and tax situations were (deductions, dependents, stimulus rebates, and so on). If she reported the income from a 1099-R, she may have answered the followup questions wrong, but we can't see the return. If the IRS is wrong and she was right, she can write a letter to explain her case. If the IRS is right, and she made a mistake when filing, she owes the payment.