Retirement tax questions

Why would it be $15,000? Because on the date of the first overcontribution it is $10,000.

 

@NCperson 

 

My issue is they (broker, Fidelity in this case) have computed a positive earnings based on the formula. On the first date of excess contribution, the account balance was $10,000 (w/the contribution), and then there was another $5,000 contribution. Then on the date of return of excess contribution the account balance was $15,000. So based on NIA formula, I end up having earnings because this account has gained $5,000 overall. Am I incorrect?