This sounds like a driver problem. Are you missing one? Do you need a dongle that maybe the working PC has, but the other doesn't?
I'm not computer literate. All I know is that the keyboard and mouse were working for years and now they don't.
But they do work on other computers and my smart TV.