First of all, let us establish what a synthesis essay does. When writing a synthesis essay, you are expected to incorporate multiple sources into your argument. You should organize your essay by major points and main ideas, like any other essay, and you should organically weave in the sources to support, challenge, and qualify your argument. You should not, on the other hand, go through each source one by one, as that would make your essay sound like a summary of the sources. Your argument should come first, and the incorporation of the sources makes your essay a synthesis of information or perspectives.
When considering how to write a synthesis essay on two pieces of literature, you need to start by thinking about what the texts have in common. Your question lists Shakespeare's tragedy Macbeth and Golding's novel Lord of the Flies. Besides the fact that these are both widely read and respected works of British literature that are often assigned to students in high school and college classes, what themes or issues do we see in both of these texts? The first common theme that comes to mind for me is how characters pursue power and how power corrupts these characters. Macbeth wants to be king immediately after hearing from the witches that he will be king some day; he murders Duncan to ascend to the throne, and he becomes increasingly paranoid as he tries to desperately hang on to his power. Macbeth's excessive ambition and ruthless desire for control leads him to have his best friend murdered, as well as the innocent family of a fellow nobleman. Eventually, Macbeth becomes a tyrant and is ousted by the rightful heir, Malcolm. The tragedy dramatizes how Macbeth quickly transforms from a decent nobleman and battle leader into a murderous dictator. In Lord of the Flies, the boys have to form their own society and government. The conch shell that they find on the beach gives the person holding it the power to speak. At first, Ralph is seen as most powerful because he has the shell, but later, Jack becomes obsessed with having more power than Ralph and the other boys. He eventually becomes a tyrant, and he is depicted as a savage. In both texts, power corrupts, though in Lord of the Flies, the setting and circumstances of the novel make it more obvious that power can make civilized people act in barbaric and perverse ways.
As you go about writing your synthesis essay, make sure you break down your argument (about the corrupting influence of power or whatever other theme you may choose) into manageable parts and incorporate evidence from both texts in each body paragraph. The thesis should also mention both texts. These writing moves will indicate that your essay is concerned with the connection between the two texts.