How to "frankenstine" wires?
Yes, it's possible in a pinch.

You will need make sure the pinouts correspond to the correct wires after you have cut the cable. They need to be matched with the other connector.

An example, here is a USB 2.0 pinout:



You'll need to use a multimeter or ohmmeter to check for continuity of the wires and the pins and ensure they match with the correct pins on the other connector.

However, I would strongly advise against doing that; it's much less trouble (and more importantly, time) to just purchase your needed cables. The cables are also made to specific electrical specifications (e.g. current rating, resistance, etc.) that may or may not be to standard with a home made cable.