set rptr to the right subtree of p

rptr = right(p);