If the wires are simple wires, not coaxial, you probably can do just that. Taking adequate care to make good waterproof joints and seal them adequately. You'll find some, ah, debate over whether solder is preferable to crimp but any proper connection should do. Usually (usually) the electrical
characteristics are not so critical as to make extensions a problem, even for coaxial cable. We replaced a rotted depth sounder
cable with some "tv" coax (of the same impedance) with perfectly good results. Odds are, you can do it. You might want to temporarily connect the new wires with alligator clips and check, just to make sure it works before you hack off any fittings and make things permanent, if you want to be really conservative.