The Tree Programs are either deliberately a red herring, or were rendered useless thanks to an error in the coding, but thankfully, you can still complete it. You need Sandy to skip the "Tree Program" thing entirely. Simply check that locked door with Sandy in your party, and she will unlock it. You will come across a small area with a chest containing a unique spellbook, and a cave. Inside the cave is another chest, and your quest will be complete when you open it!
Also, you will be teleported to the world map, but if you re-enter the Mad World and go back to that chest and check it again, you will be teleported to a new area! Go down and talk to Dave with Sandy to get some bonuses for her.