When do I report the taxes withheld from a withdrawal for excess contribution into Roth IRA?

I withdrew the excess contribution and earnings in 2018 for a 2017 contribution. I also had taxes withheld. Do I report the earnings in 2017 and taxes withheld for 2018?