Every USB communication is between a USB host and a USB device. Two hosts can communicate by connecting two devices back-to-back with a shared buffer, in other words:
USB host
USB device
shared buffer
USB device
USB host
To communicate with a device, the host uses a driver for a defined USB class or a vendor-specific driver.
One option for your application is to use two USB/serial converters and cross-connect the serial ports (null modem connection).
If you need higher throughput, you could program devices that use networking protocols.