I think Dr. King refers to the Constitution and the Declaration of Independence in his speech to show that everyone should be free and treated equally because the Constitution and the Declaration of Independence have things written in them that say, for example, "All men are created equal" to show that everyone should be treated equally. Hope that helps you.
It is plausible that Hamlet’s encounter with the pirate ship was part of the counter plot Hamlet alludes to earlier when talking with Gertrude at the end of Act 3 when he spoke of Claudius' plan to send him to England.