Sofia and the other princes and princesses arrive at Royal Prep after the summer holidays. Vivian tells Sofia about all the activities she has done, including ballet or a music festival for example. The students are greeted by Flora, Fauna, and Merryweather, who welcome them back for a new school year. After their speech the newest students are supposed to follow Fauna to the Noble Novice classroom, the students moving up to Regal Rotunda follow Merryweather, while the students starting Majestic Hall, including Sofia, Amber, James, Vivian, and Desmond, are lead by Flora. Amber is excited to finally attend Majestic Hall, James mentions the homework they will get, about which Desmond is happy about and offers to help James with it once more.
Eventually, Flora and the following students come to the classroom where they are greeted by their new teacher Professor Pecullian, a magical faun, who insists on them calling him Mr. P. Having introduced the children to their new tutor, the fairy leaves while the students sits down at their desks, Desmond is already putting his books eagerly on his table. Mr. P starts the lesson and uses his magic to turn the desks with his pupils upside down, explaining he wants them to see things differently. While Sofia calls it a fun experience and even notices the floor pattern, Desmond is scared. Consequently, the new teacher goes on, moving the tables through the room, further explaining his methods. After he finished, Desmond's book falls of his table and the teacher picks it up. Surprisingly for Desmond, he announces that they won't use books today as he wants them to learn by doing things, not by reading books because they only teach facts but no feelings. Since he explained his motivation, he goes on starting the first project, which is Mystery Gardening, not Enchanted Gardening to Desmond's surprise. Each of the students receive a little tree which will grow fruit if they find out what each of the trees like. If every tree grows fruit in time, they will make "Magical Mystery Jam" out of them. To complete the task the pupils are task with going outside to explore it. Desmond is nervous as he doesn't now how to learn without his books. Mr. P. encourages him to join the others after asking if he needs any help and being denied and the student proceeds to sit under a tree, not knowing what to do. James on the other hand succeeds in getting his tree to grow fruit by feeding it pudding, making his owner proud as he is the first in class to get fruit. Vivian's tree reacts to her humming, Amber's magical tree likes compliments. Sofia solves her mystery as she notices her tree growing when in proximity to the other trees. She rightfully deduces that her tree likes friends. Meanwhile Desmond still hasn't figured out what makes his tree grow fruit, even trying the things that made the other trees grow out of frustration. Sofia tries to help him but naturally as he is the brightest student, he denies needing help and goes to search for a solution to his problem in the library with a book.
He searches for a book on Mystery Gardening but even the only book he finds states it is a mystery. Sofia joins him and tries to help him again, finally Desmond gives in and tells her how frustrated he is because he used to be the best and is now the worst, unable to finish the project. Sofia tries to encourage him but fails, making him refuse again. To make things worse Mr. P finds them, asking if Desmond's tree had grown any fruit. Desmond's nervousness and embarrassment causes him to lie that it does and agrees he will be back in the classroom in five minutes. Mr. P believes it and leaves, Desmond gets frustrated as he realizes his mistake but he still does not accept help from Sofia or James who seems to understand the project best. He pushes the concerned girl out of the library as his eye falls on a book on Enchanted Gardening. Not wanting to fail in front of the class he takes it together with his still no single fruit growing tree to the greenhouse, exactly following the instructions in the book trying to get the magical plant to grow fruit. To his disappointment, it not only doesn't work it even makes things worse as the little plant grows into a havoc making tree monster that starts breaking apart the greenhouse. Desmond runs out of the building, now standing there without a tree or a fruit. Desmond tries to lock the monster in but it escapes through a window. When Desmond comes to her, Sofia agrees to help him out. They go to the greenhouse together to look for the monster and try to catch it. Naturally, Sofia is shocked when she sees the mess the little tree made. As she finds the book Desmond used the looks at the last page of the chapter Desmond read where it says not to use the instructions to make a mystery plant grow as it will turn into a monster. To reverse this their task is to sprinkle it with blue anti-food and replant it.
Back outside Sofia finds clues where it went and they follow it to the library finding it reading books. They try to catch the tricky thing and after some failed attempts, they eventually succeed in potting it into its pot and turning it back into a tree. Sadly the finally turned to normal tree does not grow fruit instead getting depressed looking even worse than before, leading Desmond to further frustration as he thinks not to be the brightest in class anymore. Finally Sofia is able to comfort him and encourage him to ask Mr. P for help. Back in the classroom James is very confident, even asking if anyone needs help, as he did get the tree to grow fruit first. Sofia and Desmond arrive, the latter finally asking the teacher for help, which earns him shocked reactions from his fellow students. Still he finally gives in and asks what to do. Mr. P asks him if he could open a glass of jam for him, showing his student that even teachers sometimes need help. He lifts Desmond up in the air, tells him to look at things from a new way and gives him clues how to solve his problem. As his teacher tells him that Vivian's tree likes music, James's tree likes pudding and Amber's plant likes compliments he slowly begins to realize what all the magical plants have in common: They all like what their respective owners like. After solving the mystery he tries reading "Jack and the Beanstalk" to his little, magical tree, after realizing the reason why the tree monster was in the library was that it liked books because he does too. The tree finally grows fruit and Mr. P states that Desmond was the only one to solve the mystery connecting all the trees, making him happy and confident again. James gets a bit sad but quickly recovers as Mr. P tells him he still did well. At last they get on making "Magical Mystery Jam" after the classroom is turn into a "Jamnasium" by Mr. P.
- Ariel Winter as Princess Sofia
- Darcy Rose Byrnes as Princess Amber
- Nicolas Cantu as Prince James
- Joshua Carlon as Prince Desmond
- Sabrina Carpenter as Princess Vivian
- Barbara Dirickson as Flora
- Russi Taylor as Fauna
- Tress MacNeille as Merryweather
- Steve Valentine as Professor Pecullian
- Jamie Mitchell as Tree Monster
- Professor Pecullian is the second Faun to appear in the series, preceded by Winter in "Winter's Gift".
- Moral: Don't be afraid to ask for help if you need it.
- During the song, Amber's tiara is missing when Mr. P gives the class fruit.
- The pearls on Sofia's dress disappear after the first scene of Mr. P. The pearls disappear again when Sofia and her class start walking to their desks.
- when the class are being turn upside down Desmond’s books falls off of his desk but when Sofia notice that the floor makes a picture his books are gone for the rest of the episode.