Just buy a switch. You plug the monitor into the switch along with both computers and you an toggle between them via a button on the switch. We have 3 servers here at work tied to one monitor, one keyboard and one mouse.
You can buy the switches at any computer store,(online or brick and mortar).