Shut off the main water supply and main sewer line, remove the damaged section, and replace it with new piping, ensuring all connections are securely sealed.