These riddles are part of the Durlag's Tower dungeon in Baldur's Gate: Tales of the Sword Coast and Baldur's Gate: Enhanced Edition.