The spell affects all teleportation effects with their destinations inside the spell's area, including teleportation effects used by nearby creatures and allies
The 3rd-level spell anticipate teleportation [abjur] (SpC 13) et al. says that
The subject of the spell is surrounded with an invisible aura that anticipates and delays the teleportation of any creature into the spell’s area. Any teleportation spell or effect (including all spells with the teleportation descriptor) can be anticipated, making the spell’s recipient instantly aware of the exact location where the teleporting creature
will arrive (subject to the restrictions below), the creature’s size, and how many other creatures (and their sizes) are arriving with the teleporting creature.
The spell also delays the arrival of the teleporting creature by 1 round (so that it arrives on its initiative count immediately before its next turn), generally giving the recipient of the spell and anyone else made aware of the information 1 round to act or ready actions. The teleporting creature does not perceive this delay. [...]
The spell has no effect on creatures attempting to teleport away from the spell’s area, although if their destination is within the area, the spell will affect their reentry as normal.
If the creature's teleportation destination is inside the effect of an anticipate teleportation spell, the creature's teleportation effect is delayed, whether the creature is using a teleportation effect from, for example, 10 ft. away, 100 ft. away, light years away, or another plane.1 Spell resistance, caster level, and the level of the spell used to generate the teleportation effect make no difference to the anticipate teleportation spells.2
The paladin PC needs to save the lady in distress from the dastardly sorcerer. The paladin PC employs his Use Magic Device skill to activate his wand of benign transposition, trying to swap places with the lady in distress. The paladin PC and the lady in distress are unaware that their destinations are both in the area of the rogue/wizard PC's greater anticipate teleportation spell. Both the paladin PC and the lady no-longer-in distress are out of action for the next 3 rounds, and upon their returns find the dastardly sorcerer gone; the fighter PC on the ground, helpless, having been reduced to 0 Str; and the rogue/wizard baleful polymorphed into a cat.
The anticipate teleportation spell line is an essential element for keeping mundane folks alive past level 6 in an optimized environment, but be sure to tell your party members that the spell's on--it's duration is 24 hours, and it's not dismissible, meaning that usually resources have to be devoted to making it go away early. The spell can be just as dangerous to party members as it is to foes.
- All the spell stand [conj] (PH2 125-6) does is make a prone creature upright, but it's a teleportation spell therefore affected by the spell anticipate teleport, too!
- There is that pregnant-with-meaning can in spell description's second sentence, but the spell makes no further mention of it being in any way a controllable or selective, so the use of can there should not be mistaken for the caster being able to allow some teleportation effects and disallow others but simply read as a helping verb. Yes, that could be clearer, but the spell provides no mechanism of choosing not to anticipate a teleportation effect anyway.