The most obvious literary connection is to Hamlet, which features prominently in the play and is, if you will, the set-up for Stoppard's joke. But other plays share deep connections to Rosencrantz and Guildernstern Are Dead, notably Samuel Beckett's Waiting for Godot, which famously features a pair of fools waiting for answers. It will be difficult for students without at least a rudimentary understanding of Hamlet to get much of Stoppard's play, and thus it could be extremely useful to study the two plays in tandem if possible.
Also consider other books and plays in which a minor character from another literary work is fleshed out and given a perspective, such as Jean Rhys's Wide...