The wire was too short to reach? Any auto parts store and sell you a roll(s) of wire that will do the job of extending the wire 1-100 feet.
The green and black/white wires - one is hot(red) one is ground(black), same with your red and back wires on the new usb port you bought. I don't recall off hand which is which, but testing with a multi meter should clear that up in about 2 seconds. If I recall the hot wire (should be red) is the one attached to the center post of the cig lighter. I can't really tell from the picture, but I would not hook it up without testing it with the meter first anyway.
Yes, it would all be easier if Toyota just used all red and black, but imagine looking at a bundle of 15-20 wires and they are all red and black, you have no way of knowing which wire ran to which part of the truck.
I added a similar USB port to that same spot. However I just ran a hot wire (red) all the way (with a fuse) to my second battery. Black wire is simply grounded to the body or bracket someplace) Plain and simple, it's always hot and makes charging things a bit more flexible for me.
If your worried about your 40K just buy a couple of these
couple of these one for the front, one for the back, the glove box, center console, back seat or where ever you have a cig port and be done with it.