When the machine asks for the number, you need to imput the chemical number that you get from the bookshelf, not the solution number that you are working on. This will make the right solution, and the Mage Guildmaster will see it then.
Now when I speak to that rat bastard he gives me a different solution! I really don't want to make the trek back to Payon, so any help would be rewarded with free Asian hookers.