Then on computer B go to networking and find the shared printer and print to it
There may be some differing details depending on if you are home networking, workgroup networking or domain networking though. Also some more steps if the machines were different OSes (I.e one XP and one 7)
My Computer
Computer Manufacturer/Model Number
Scratch built
OS
Windows 7 x64 Ultimate
CPU
i7 960
Motherboard
Asus P6X58D
Memory
12 Gig Corsair Dominator
Graphics Card(s)
Nvidia 480
Sound Card
Maudio Delta 44 + breakout box
Monitor(s) Displays
Dell UltraSharp U2410 24in and Samsung 21 dual monitors
If the printer has two inputs or is networkable those are other options. Personally I have a house server that is the only computer that is always on with my two printers connected to it...
You know, there /may/ be USB A/B switches like we used to use for serial and parallel ports back on the OLD days... try googling for it.
My Computer
Computer Manufacturer/Model Number
Scratch built
OS
Windows 7 x64 Ultimate
CPU
i7 960
Motherboard
Asus P6X58D
Memory
12 Gig Corsair Dominator
Graphics Card(s)
Nvidia 480
Sound Card
Maudio Delta 44 + breakout box
Monitor(s) Displays
Dell UltraSharp U2410 24in and Samsung 21 dual monitors