DC bought up Fawcett comics trademarks but didn't use them so they lost the rights to title a book Captain marvel when Marvel swooped in and bought the rights as soon as they were available.
With trademarks and copyrights its use them or lose them. As long as Marvel publishes a captain marvel book at regular intervals even if it is reprints of Mar-vell stories, the trademark is theirs.
As to the movie trademark, I'm guessing it is separate from the book and Marvel secured it first.
Well, with trademarks it's "use or lose." Copyrights are different. They remain for a set, specific amount of time after the owner dies, and you cannot lose them due to lack of use. Abandonment requires a specific statement of such.
And in the business world, trademarks are kind of more important.