Measure the exterior diameters of both pipes with a tape measure and purchase a rubber boot that will fit both pipe ends.
Loosen the clamps on both sides of the boot using a flat-head screwdriver. Slide the end of the boot that fits onto the drainpipe over the pipe opening until the pipe fills half of the boot. Use a screwdriver to tighten the screw holding the metal clamp around the body of the boot over the pipe. This will tighten the clamp to secure the boot in place.
Slide the other end of the rubber boot onto the other pipe end. Push the pipe into the boot until it meets the first pipe in the center. Tighten the clamp over the boot and pipe on the second end to secure that end of the boot in place as well.
Turn on the water feeding the drain to test for any leaks. If the boot leaks from one end, tighten the clamp further to increase the seal.