One thing that you could do is look at the leading characters, Pi and Hamlet, and try to compare and contrast them in terms of what they are facing in their lives, their beliefs, and how they handle situations. For example, both of them lost loved family members and had to deal with that awful reality. They were very contemplative, meditative sorts who pondered life's meaning often, analyzing everything and introspecting quite a bit. They both had to make tough decisions about how to survive in the worlds after their parent(s) had died, and went about surviving the best way that they could. They both had to evaluate their circumstances and analyze the motives of the people/animals around them in order to figure out what to do. To contrast these two characters, there are some obvious differences. Pi lived, Hamlet did not. Pi lost all of his family, Hamlet only his father (until the end, that is). Pi practiced many different religions, and most of his meditation was on those themes, whereas Hamlet's meditation centered around mankind and their weaknesses of courage and mind. Hamlet procrastinated acting whereas Pi acted immediately to save himself.
Other ways that you can look at some similarities and differences can be in the areas of style (one is a play, one a novel, but both are very descriptive), supporting characters (bring in the differences in the villians of these stories, and similarities in other characters), historical context (Pi is modern-day, Hamlet is in the past) and setting. Overall, there is quite a bit to talk about regarding this subject. I hope that those thoughts help to get you started--good luck!