Although several computers can be connected to the same wireless router, each computer may be assigned a different SSID.
If the SSIDs assigned by the wireless router are not handled as the same network, then each computer is effectively connected to a different network. When you start setting up the printer from computer A, the printer is added to the same network as computer A allowing computer A to print from it.
Furthermore, if you start setting up the printer from computer B in the configuration shown above, the printer is set up on computer B's network allowing computer B to print but not computer A.
To prevent this from happening, when you want to set up a networked printer from a second computer, start the installer on the computer connected to the same network as the printer. If the printer is found on the same network, the printer will not be reconfigured for the network, and it will set up the printer ready for use.