Using a USB device locally on 2 computers
You will not be able to make a Y cable as you describe and get it to work. USB is a point to point connectivity protocol --- that is a single host end connects to single target end. The connection that you describe would be a multi-host single target type bussed connection and USB is not designed to support that. 

As a side note you would never want to interconnect the power between two computers either. GND to GND would be OK but not the 5V to 5V.

There are available products that perform a function close to what you want. These are two way USB switch devices that allow for multiple hosts to share one target device - but one at a time through either a mechanical switch/relay or through an electronic switch component.