In "Rosencrantz and Guildenstern Are Dead", playwright Tom Stoppard is creating a comedy for a very sophisticated audience who are very familiar with William Shakespeare's Hamlet and with twentieth century philosophical thought.
The two protagonists, Rosencrantz and Guildenstern, are minor characters in Shakespeare's play, hired by the king to spy on Hamlet and to accompany him to England. They are comic characters and somewhat naive. A secret letter tells the king of England to kill Hamlet. Hamlet discovers the plot, and arrange for Rosencrantz and Guildenstern to be killed instead. At the very end of Shakespeare's play, a messenger brings the news "Rosencrantz and Guildenstern are dead." That news becomes the title of Stoppard's play.
The two protagonists are outsiders with respect to the plot of Hamlet, and have no connection to the players and little connection to the court. Much of the comic effect of Stoppard's play is attained by using their confusing as a lens through which to see the main actions of Shakespeare's play.