Yeah, I agree with toml3030 - if you send them any money then that would basically be an admission of guilt. This probably won't go anywhere further because it's most likely not worth anyone's time to actually sue you, but in the event it did... you don't want any acknowledgement of liability.
At this point they've notified you of a copyright infringement, and you responded by removing the infringement. If it did proceed further then your best defense as innocent_kid mentioned is to claim you believed you had resale rights. As soon as you found out otherwise you ceased reselling it. Don't do anything to try proving you were justified in believing that, just claim that you come across ebooks with resell rights all the time and apparently made a mistake this time and leave it at that.
I also would suggest not claiming you're account was hacked, because that is something that could be proven false. That would amount to an attempted coverup in which case you could be in even more trouble. You've probably heard about the story from a few years ago when Shepard Fairey entered an art contest and his submission was selected by the Obama campaign. In creating the "Hope" poster Fairey had used a reference photo from the Ass. Press which he gave no acknowledgment for and it turned out didn't have the rights to use. There was a big lawsuit over it and Fairey broke a few more laws trying to cover his ass. He ended up with huge fines and was sentenced to probation for his attempted cover-up.
All that has happened so far is that you received that email. You're response was to remove the listing and stop reselling the ebook. That is the extent of what you should do at this time. If you respond to the email, I would not say anything more than "we received your complaint and have removed that ebook from our listings, thank you for the notification". If it did proceed to a lawsuit then any emails could be used in the case, so it's best to say as little as possible. Don't make any further responses and save any emails they send to you in case it ever did proceed further.
As long as you have stopped selling their ebook, it is unlikely they will do anything more. In fact, unless it is a large company they probably were just blowing smoke when they threatened to talk to their lawyer. Copyright lawsuits can be very expensive.
You've done everything you can, so just move on and forget about it.