You can use copyTo function of openCV. For example assume that piece1 and piece2 are images of two pieces of paper:
Mat twoPieces (piece1.rows, 2*piece1.cols, piece1.type());
piece1.copyTo (twoPieces(Rect(0, 0, piece1.cols, piece1.rows)));
piece2.copyTo (twoPieces(Rect(piece1.cols, 0, piece2.cols, piece2.rows)));
I assumed here that the images are of the same size but if they not you can update the code. Also the example above showed how to copy whole image. You can define mask and copy only the places with pieces of paper. To draw mask you can use polylines.
Mat mask1(piece1.size(), CV_8U, Scalar(0));
polylines(mask1, piece1Contours, true, 255, CV_FILLED);
piece1.copyTo (twoPieces(Rect(0, 0, piece1.cols, piece1.rows)), mask1);
And of course if you know the shift between the pieces of paper you can change the point of origin in Rect so that both pieces will be adjacent to each other.
Mat mask2(piece2.size(), CV_8U, Scalar(0));
polylines(mask2, piece2Contours, true, 255, CV_FILLED);
piece2.copyTo (twoPieces(Rect(dx, 0, piece2.cols, piece2.rows)), mask2);
Once again I simplified the example assuming that the shift is only in X direction. It can be done with shift in both X and Y direction but it will require more calculations, like estimation of bounding box of your polygons.