After Hamlet talked aggressively to Gertrude, Gertrude went and told Claudius what had happened and also the murder of Polonius. Claudius wants to take action, but he wants to do it lowkey by sending Hamlet to England .
Hamlet got done hiding Polonius's body, then Rosencrantz and Guildenstern questions Hamlet about the body. "What have you done, my lord, with the dead body?" Act 4.2 193. Hamlet took offense to them questioning him. Hamlet ended up letting Rosencrantz and Guildenstern to escort him to Claudius.
Hamlet arrives with Rosencrantz and Guildenstern. Claudius pressed Hamlet to reveal where Hamlet had hidden Polonius's body. Hamlet ends up telling Claudius. Claudius sends Hamlet off to England.