Trademark is based on a "first use in commerce" system.
I see two likely possibilities. There are more, but I think these are the most likely.
The first is that Paizo contracted to sell WOTC the rights to publish "Adventure Path" products in Dungeon magazine. In that case Paizo has rights to the trademark, unless contracts specifically say otherwise.
The second is that Paizo had a general contract to publish Dungeon and Dragon magazines, and WOTC had a clause in the contract giving them ownership of EVERYTHING that appeared in it. This would give WOTC the trademark rights to "Adventure Path."
The way stuff gets done in the real world suggests that number 2 is how things went down. I think its more likely that there was a half assed contract with a lot of generic clauses giving WOTC rights to everything in Dungeon Magazine, including all intellectual property.
This is especially likely if Adventure Path was invented as a term after the contract was signed, because then you'd be delving into non compete issues. The usual rule is that if I contract to publish a magazine for you on, say, fishing, I don't get to go do fishing article related activities outside of my job at the magazine. Any fishing article related stuff I come up with will be your property. This is to stop contracted companies and persons from running side projects that pay them directly.
The real way this will get resolved is on a "does WOTC care?" basis. If they don't, Paizo will get the term. If they do, there will be a showdown, and we'll find out what the contracts really say.