Partial answer for what the Mathemagician was thinking:
After the first 3, he has no clue, so he waits because one number does not a sequence make. Then he guesses the same number again, just in case that was the entire sequence, one number repeated infinitely
After the second number, we have 3, 0.
The mathemagician guesses that the sequence subtracts three each time and the next number would be minus 3.
After the third number, we have 3, 0, 6.
Mathemagician now has enough of a sequence to work with here, or so he thinks. He looks at the differences between the three numbers and finds a shorter sequence, -3, 6. The difference between those two numbers is 9, so the next number in the addition sequence should be 15. He confidently guesses 21 as the next number, because 6 + 15 = 21
After his third wrong guess, the sequence we have is 3, 0, 6, 6.
The Mathemagician takes the same steps again, he looks at the sequence of differences, -3, 6, 0.
He then follows the exact same steps from the previous guess and looks at the differences here to get the sequence, 9, -6. If the pattern is subtracting 15 each time, this sequence becomes 9, -6, -21. The previous sequence must have it's next number found by subtracting 21, so it is now -3, 6, 0, -21. If we subtract 21 from the last number given to us by Heptis, we come up with -15 as the answer.
Unfortunately for the mathemagician, wrong again! The sequence is now 3, 0, 6, 6, 3.
He really likes his method he's been using, so he tries once more. The first sequence of differences is now -3, 6, 0, -3. The next is 9, -6, -3. The next is -15, 3. Aha! So we add 18 to get the next number in this sequence, -15, 3, 21. Add 21 to the previous sequence and we have 9, -6, -3, 18. Add eighteen to the previous sequence and we have -3, 6, 0, -3, 15. Add fifteen to the last number given by Heptis and the magician guesses 18.
Wrong again! The mathemagician is losing confidence in his method. But, he soldiers on. What's the sequence now, 3, 0, 6, 6, 3, 6? Okay.
You'll forgive me if I don't write down all the steps, but suffice to say, he looks at the sequences of differences again, going one step farther back this time, and the answer he finds is 18. He's fairly certain his methodology is flawed at this point, but he has to guess anyway.
After this point the Mathemagician basically gave up, so I'll stop here. If you need me to make my steps clearer I can, but the way I did this was by drawing a little pyramid of sequences, with like, arrows and stuff on paper, so it's not the most sophisticated method. I tried to explain as best I could.