I have my personal gaming desktop hooked up to my u3415AW monitor. I believe it is HDMI.
Then I have a docking station connected to the display port that runs to a Dell USB-C Dock that I can put my laptop on.
I have a KVM switch, so all I have to do is hit the swap button and change my input on the monitor from HDMI to DisplayPort when I want to switch.
Takes about 5-10 seconds. EZ.
Are you trying to have both PCs on the display at the same time or have it so you can swap easily? Not sure I understand if thats your goal.