What did Voltimand and Cornelius do in Act II, Scene 2 of Hamlet?
To accurately know what Voltimand and Cornelius did, one has to know the context for their actions.
In Act l, scene l, whilst standing watch on the battlements, Marcellus asks Horatio if he knows why they are keeping vigil and why it seems as if Denmark is preparing for war. Horatio tells him that preparations are being made against a possible invasion by the young prince Fortinbras of Norway, who has put together an army of lawless mercenaries to take back land he believes was illegally taken from his father. Horatio states that the land was legitimately won in battle when king Hamlet defeated the young Fortinbras' father.
At the beginning of Act l, scene ll, Claudius refers to the same situation and has called on his two emissaries, Voltimand and Cornelius, to go on a mission to Norway, where they should consult with the ailing king and inform him of his nephew's (Fortinbras) intentions, a matter which the king was unaware of. The purpose of their errand is to avoid an unnecessary confrontation between the two armies and ensure peace between the two countries. The king would, therefore, obviously have to stay prince Fortinbras' hand in some way or another.
Act ll, scene ll, depicts the return of the two ambassadors. They report that they were well received by the king of Norway and that he sends greetings. They further inform Claudius that the king immediately acted against Fortinbras and stopped him from hiring any soldiers, an act that, he believed, was in preparation for an attack against the Polish. He sent out an arrest warrant for the prince and Fortinbras willingly gave himself up. He was sternly reprimanded by his uncle and the prince vowed never again to raise arms against Claudius. The king was so pleased with the young prince's promise that he gave him three thousand crowns and a commission to use the soldiers that he had already hired against Poland.
The ambassadors then give Claudius a written request asking that Fortinbras be given safe passage through Denmark in his quest against Poland--an appeal which Claudius mostly gladly agrees to.
Voltimand and Cornelius are ambassadors, sent by Claudius to speak with the king of Norway to discuss the possibility of war with Fortinbras, the nephew of the king, who is rumored to be planning an invasion of Denmark. Voltimand reports that the king has chastised Fortinbras for his actions, which were undertaken under the pretext that Norway was about to invade Poland. It emerges that the king decides to give Fortinbras a commission to invade Poland as originally planned, and that he asks the Danes to guarantee him safe passage in order to do so.