To start with, you need a focus. The two characters are very different, so randomly contrasting them would serve no purpose. However, both characters commit regicide. You might look at their motivation, influences, reluctance, effects on conscience that the act of killing a king has on each one. You will have to keep in mind, though, that Macbeth kills Duncan very early in the play and that Hamlet actually kills Claudius at the end of the play. So, when you write about Macbeth, you will be dealing with consequences of such an act on him, his relationship to his wife, and his country. When you write about Hamlet, you will discuss most likely the consequences of the consideration of such an act on him, his relationship with Ophelia, and the Danish court.
I hope this helps.