unplug them and restart the computer, wait till it starts up and if it keeps on beeping, just turn if off and then plug them back in, and start up, while its stating up dont hit any keys
next try using them on a different computer or use a different mouse/ keyboard and see if the new ones dont work.
how old is the mouse and keyboard