Went through a similar situation where I owned (company).com and someone later filed for a trademark and registered the(company).com. I hired a trademark attorney and he sent a nastygram back.
We had evidence of first use in commerce and offered not to sabotage their pursuit of a trademark. They immediately agreed, backed down, and signed a document allowing us to use the name unrestricted irrespective of whether they successfully obtained the trademark. As we expected, the trademark application was denied (the name was descriptive, not unique) and it was all behind us quickly.
TLDR: get a lawyer. Trademark law is weird.
And don’t be mean - the other business is now your first call if you ever decide to sell.