Assuming that your regular contributions were traditional elective deferrals and not Roth contributions, because these were excluded from the income reported in box 1 of your W-2 from the two employers, the $9,000 must be added back to your income. To enter the $9,000:
- Go to Miscellaneous Income, 1099-A, 1099-C -> Other income not already reported on a Form W-2 or Form 1099
- Answer Yes to Did you receive any other wages?
- Proceed through the unrelated questions, then answer Yes to Any Other Earned Income?
- Select Other as the source of the other earned income
- Enter your $9,000 of excess elective deferral
TurboTax will include the $9,000 on Form 1040 or 1040A line 7.
The "penalty" for the excess deferral will be that this money will be taxable again when later distributed from the 401(k) as part of a regular distribution at some point in the future.
As for the $54K limit, that limit is a per-plan limit, not a per-individual limit. You apparently contributed $18K in regular contributions and $31K in after-tax contributions to the second employer's plan. As long as this employer did not contribute more than $5,000 in matching or profit sharing contributions, the $54K limit was not exceeded. If the total employee and employer contributions to this plan did exceed $54K, the employer MUST make the correction or risk disqualification of the company's entire retirement plan.