The creature that triggers the glyph will be teleported to a place the caster chose upon casting
Your second option is the correct one.
Misty step has a range of self, which means it only targets a single creature. As such it is qualified to be cast and put into a spell glyph.
As for what happens after it triggers, glyph of warding says:
You can store a prepared spell of 3rd level or lower in the glyph by casting it as part of creating the glyph.
You cast the spell fully when you put the spell in the glyph which means you also need to choose the parameters of the spell, just as if you were casting it normally.1
When the glyph is triggered, the stored spell is cast. If the spell has a target, it targets the creature that triggered the glyph.
Note that the creature who triggers the glyph is not considered to be the caster of the spell, it is considered to be the target of the spell. Essentially, the glyph casts the spell by proxy. Normally this means that the creature would have no input on how the spell works it would just receive its effects. The ambiguity here is that misty step has a range of self which means that normally, the only person who can be targeted by the spell is the caster.
In this case, however, glyph of warding overrides that and makes them the target of the spell even though they are not the caster. And, because the spell has already been fully cast, there is nothing else for them to choose.
Thus, they are teleported according to the conditions set on the original casting of the spell/glyph.
1 - This means you also technically would choose a target/area for spells in general when you cast them. However, after triggering, this is the one parameter that glyph of warding overrides.