To replace a plastic drainage pipe, locate the damaged section on the pipe, cut off the damaged section, find a replacement pipe, apply primer, and use a coupler to join the replacement pipe to the main drainage pipe. Wear gloves and cover yourself with a plastic sheet when working.
Assess the plastic drainage pipe to identify the damaged part, use a hacksaw to cut off the damaged pipe, and set it aside. Level the cut edges of the main pipe with a putty knife. Find a replacement pipe of the same material and size as the damaged pipe, sand the exterior top section of the pipe with fine-grit sandpaper, and apply primer to the pipe. Ensure that you use a primer that is compatible with the drainage pipe.
Use a brush to glue the inside top part of a coupler, screw-thread one terminal of the replacement pipe, clean off the threaded surface with a dry brush, seal the joint with a high-quality adhesive to prevent leakage, and fix the coupler into the pipe. Repeat the process on the other terminal. Be sure to use a coupler that fits well with the pipe. While twisting, put a strong solvent on the terminals, and fit the replacement pipe to the main pipe.