Chakra Meditation's second triggered ability will trigger and resolve before the instant or sorcery spell that triggered it. Notably, if you cast a Lesson spell while you have two Lesson cards in your graveyard, you will still have to discard a card to Chakra Meditation's ability because the Lesson you cast is still on the stack.