I could be mistaken on this, but here is my answer:
Both effects trigger simultaneously during the Entering Zone Effects step of movement. They can not take effect simultaneously though, so we have a timing issue. Despite the chance that the person with Initiative might not control any of the objects in question, the game has well established the fact that they are the ones who decide any timing issues that arise during game play whenever it is in question. Thus, whomever has Initiative should decide which occurs first.
However, even if Teleport Trap occurs first, the Spiked Pit still has to resolve it's triggered effect. The teleport happens before it makes it's attack (if it rolls a 9+), so the rules about moving during an attack do not apply. They moved before the attack, not during. But there is still a catch. The rulebook doesn't specify this, but the marker itself does have a melee attack icon on it. And if it is a melee attack, then if the target has moved out of the zone it will be out of range of the attack during the Declare Attack Step. This would result in the attack being cancelled.
Then the question becomes whether or not the marker is removed if the attack is cancelled? I am not sure, but given what's in the rulebook and Laddinfance's previous statement, I would say it is removed whenever it is tripped by rolling a 9+ on the effect die, regardless of if the attack was successful or not. This topic could use an update in the Supplement.