You are describing a USB-USB bridged cable - these certainly exist and can be had from ebay / amazon etc. If you do want to go down this route, bear in mind that USB2 is relatively slow - slower than simply connecting the PCs together over a wired Gb LAN - but that USB3 is up to 5Gb, provided that both devices have a USB3 port.
Both computers would need to have an operating system installed and booted, however, compatible with the chosen USB bridge cable, and with any required drivers installed.