I took a rather thin USB extension cord, ran it 4 times through a ferrite core (one that comes in two halves in a piece of plastic and can be closed with a click) and ever since I haven't had any errors on my PC.
Trying to do with with IIC is a bad idea. IIC is really meant for communication between chips on a single board. Since the maximum required current to pull a line low is limited, the lines are relatively high impedance (a few kΩ). This means they can pick up noise easily, which is a serious issue when running in unshielded cable in the walls possibly right next AC power wires.
I would use CAN for this. CAN uses a single twisted pair pulled together with only 60 Ω at any one point, and the signal is differential. That means most of the inevitable common mode noise that will be picked up due to capacitive coupling can be cancelled by receivers. CAN running at 500 kbits/s can cover something the size of a ordinary house.
Many microcontrollers are available today with CAN built in. You usually need a separate physical tranceiver chip (like the common MCP2551), but the lowest few layers of the protocol are implemented in silicon in the CAN peripheral. The firmware interacts with the CAN bus at the level of sending and receiving complete packets. The collision detection and retry, checksum generation, details of the bus packet signalling, received checksum validation, and clock drift adjustment are all handled for you.
Don't fall for RS-485. That's a relic from a bygone era. It also uses a single differential signal like CAN, so also has good noise immunity. However, people usually fall for RS-485 because it looks "simpler". This is only because they don't look at the whole system. First, it's not really any less complex electrically. You will still need some kind of transciever to drive and receive the differential signal. Whether you have a RS-485 transceiver connected to the microcontroller's UART, or a MCP2551 connected to the CAN peripheral is pretty much irrelevant in terms of cost and hardware complexity. The big difference is that RS-485 leaves you at the raw byte level (via the UART). This means to implement any meaningful and robust system, you have to invent your own protocol to handle collision detection, decide how to handle retries, packetization, checksum generation and checking, flow control, etc. You can use a single master architecture, but getting the details right is a lot more tricky than people think that haven't analyzed all of them carefully. With CAN you just send and receive packets, and the hardware takes care of the details.
Best Answer
Actually, the cables can be much longer than 5m if you mean HS transmission, see SuperUser Maximum length of a USB Cable.
However, running two USB2 links over two unshielded pairs inside one standard CAT5/6 cable will create substantial cross-talk between two channels, especially over such long cable. If USB devices are HS (480 Mbps), two host ports might see unwanted/unexpected signals, and shut themselves down. More, CAT5/6 cables have 10% higher differential impedance, which increases inter-symbol interference and makes more noise. And lower quality cables (CAT5) make the situation worse. So I am not sure if two USB2 channels over the same UTP networking cable is a good idea.
If anything, you should try Shieleded Twisted pair cable, like this one:
You might have a better chance with that. And obviously, higher electrical quality of CAT6 cable will be quite beneficial for USB HS signals.
Regarding power over USB at 5m distance over UTP, the common cable wires are not that thick, 28AWG, so the voltage might drop substantially. And you will need individual VBUS wires for each USB link, so you can't use a pair of them to increase conductivity.