By the end of Act 3, where this scene occurs, Hamlet has been through a lot and is "on to" the actions of those around him. He has accidentally killed Polonius and tells his mother that he plans to "lug the guts into the neighboring room." He actually ends up hiding the body for a short while as another symptom of his "crazy" act, and to annoy and frustrated Rosencrantz and Guildenstern who have been sent by the king to find out where Hamlet put the body.
Before he leaves his mother's chambers he reveals that he knows that Claudius is planning to send him to England with Rosencrantz and Guildenstern as his escorts. He seems very pleased to say that he doesn't trust them any more than "I will trust as adders fanged." He then reveals that he plans
"to have the engineer / Hoist with his own petard; and 't shall go hard / But I will delve one yard below their mines / And blow them at the moon."
What he is saying is that sometimes when people makes plans those same plans can blow up in their faces. He is hoping to turn their deceit back on them and destroy them. He predicts that "two crafts" will directly meet. He using the image of two ships (two people) who are on an inevitable collision course with each other. Claudius and Hamlet have been on this type of path and they will have their logical face off at some point, and Hamlet knows it. He thinks it is a nice irony that Rosencrantz and Guildenstern have insinuated themselves between these two men and will likely suffer some of the damage of the collision. That is exactly what happens by the end of Act 4 when Hamlet finds (in R and G's possession) Claudius's message to England demanding Hamlet's death which he promptly rewrites to condemn them.