You don't technically need Edgar for this sidequest since anyone can use Figaro castle now but since it occurs in relation to his home turf I decided to classify it like this. You'll probably want a high-level party for the tough enemies and the two semi-bosses you'll have to fight. First, head to Figaro castle. Just for reference Figaro castle is in the desert of the continent to the northwest by Kohlingen, or else in the continent just to the southeast of that if you moved it. Move the castle from Kohlingen to Figaro and you'll get an offer to stop along the way to investigate a stratum. Head right and go through one of the prisoner's cells to find yourself in a cave.
Do your usual routine of clearing the place out of chests. Be warned that the chest in the top right of the second room will have a tough monster-in-a-box fight against a Master Pug for a graedus. Work your away around the second room to the top left to move into another area. When you reach the room with the stairs make sure to walk through the walls for two more chests, and go down the stairs to find yourself outside the Ancient Castle. Walk forward a bit to witness a cutscene about the war of the Magi.
Head through the little door on the right to get a punisher weapon, and head through the two alcoves on the left to get a tough monster-in-a-box fight against the Katanasoul. It reflects magic attacks so use your best physical fighters to get through about 32000 HP. When you win, you'll get the Offering, the best relic in the game. It allows you to attack four times. When paired with the Genji Glove this enables you to attack eight times in one round.
Head through the castle doors and in through the next room to see Odin standing in the center of the hall. Talk to him and you'll receive the esper Odin. The esper teaches you meteor at a rate of x1 and is the only esper to give you a Speed bonus on leveling. Odin's magicite is the only one in the game that you aren't intended to keep forever; however it is not critical to train anyone to use Meteor now, as a different esper will later teach you Meteor at a rate of x10. You may choose to keep Odin for an extended period if you want to level up a character with a very high Speed attribute.
The left passageway takes you to the room above the fight with the Katanasoul which is empty of items. From the main hall, the left alcove on the right side of the throne takes you to a secret room with a blizzard orb, which gives Umaro a special attack, and a gold hairpin, which cuts MP use in half.
Head into the right passage from the main hall to enter the Queen's bedroom. Pick up the glowing dot to read the Queen's diary, which tells of her love for Odin. If Terra is in your party she'll comment briefly on it. The scholars in the Figaro library talk about an ancient text they found which mentions the thousand year old city, with a line stating that "the queen stands and takes five steps…" Go back to the throne room and take five steps below the queen's throne on the right, then press A. You should hear a staircase get triggered, and you'll see it if you walk back to the Queen's bedroom. Walk down the stairs to reach a large room with a Blue Dragon walking around and a statue resembling Celes at the end. You can talk to the statue to permanently transform the Odin esper into Raiden — in doing this you trade away your only chance to pick up the speed bonus in exchange for your only chance to learn the spell Quick (and pick up a Vigor+2 bonus on leveling which is already offered by other espers).
When you're ready, fight the blue dragon. It is vulnerable to poison and slow. It's weak against lightning, use your strongest magic and equip the offering/genji glove combo on your best fighter for some serious destructive potential. After that, you're finished with the sidequest, go back to Figaro castle, tell the man in charge to continue, then you'll probably want to tell him to head back so you can pick up your airship.