Hoist with his own petard
The letters contain a request from King Claudius to the King of England to have Prince Hamlet killed, but Hamlet manages to modify them during the journey so that they instead request the deaths of Rosencrantz and Guildenstern. Hamlet is thus able to return to Denmark in secret to seek his revenge.