Buy a Freedom scroll from the Duegar in the Underdark and cast it somewhere in the area to release the mage Vithal. The spell freedom works too, but you probably don't have a mage who has the level required to cast lvl 9 spells.
Speak to Vithal and he will ask you to retrieve his Book of Rituals from the Svirfneblin.
Speak to the innkeeper in the Svirfneblin village to the north and pay him 300 gold for the Book of Rituals.
Return to Vithal with the book and follow him to the Earth Elemental portal to the southeast.
Defeat the Greater Earth Elemental and then wait for Vithal to return from the Earth plane.
Do the same for the Air and the Fire portals. He will reward you and you can demand a greater reward, but don't ask too much.