You will need to create 2 machines and a power source. The first of the 2 is the chemical decomposer, then you must have a chemical synthesis machine as well as plenty of test tubes. The first thing you must do is use the chemical decomposer to break down items into the base components.

Then you need to take those components to the chemical synthesis machine and place them in certain formations and amounts to create a chemical compound. Some are helpful, some are not.