It does take two spell slots.
The first line of the spell describes what happens when you cast the Glyph of Warding:
When you cast this spell, you inscribe a glyph that harms other creatures...
Later, it specifies that if you choose the spell glyph option, you cast the spell you choose to store (emphasis added):
You can store a prepared spell of 3rd level or lower in the glyph by casting it as part of creating the glyph.
PHB 201 specifies that when the "casting" wording is used, it uses up a spell slot:
When a character casts a spell, he or she expends a slot of that spell’s level or higher, effectively “filling” a slot with the spell.
This interpretation is consistent with other game mechanics that are more explicit about how this works. For example, contingency works this way:
You cast that spell, called the contingent spell, as part of casting contingency, expending Spell Slots for both, but the contingent spell doesn't come into effect.
or the ring of spell storing:
Any creature can Cast a Spell of 1st through 5th level into the ring by touching the ring as the spell is cast. The spell has no effect, other than to be stored in the ring.