Deductions & credits

why not just tell the trustee/custodian you want to withdraw the excess contribution of $Y and the income earned theron. They should be fully capable eof calculating the amount.