The 415 limit doesn't change - but catch-up contributions are not considered when applying the 415 limit.
You have deferrals of 22,500. That exceeds the 402(g) limit by 4,000, so 4,000 of that is reclassified as catch-up. The remaining 18,500 deferral continues to be counted as annual additions.
Then you make an employer contribution of 38,500. Add that to your 18,500 and you now have 57,000 in annual additions. This exceeds the 415(c) limit by 2,000 so 2,000 of your 18,500 deferral is reclassified as catch-up. So you end up with annual additions of 16,500 (deferrals) + 38,500 (employer) = 55,000 which satisfies 415, plus 4,000 (exceeded 402(g) limit) + 2,000 (exceeded 415(c) limit) = 6,000 catch-up contributions.