Don't try and save that OEM keyboard, or try and find a replacement keyboard; odds are, the cost will be more then a new 3rd party Logitech keyboard+mouse combo for $15-20.
On this model, it looks like HP buried the adapter so you need to take the back off to access the receiver. In this case when you replace the keyboard with a 3rd party unit you'll need to disassemble the machine to not use a port elsewhere. You can either keep the case intact, or cut a hole near the USB port to accommodate a short USB extender and make replacement easier in the future.
Personally I'd probably cut a hole in the machine if I had to and add an extender. This kind of solution shouldn't be required, yet it may be. Personally I'd see if I can sneak a extender in there and then run a extender without cutting, but you may need to cut a little plastic off the RAM door to fit the extender in the chassis.
The reason I'd do this is generally speaking if I have one and I own it, someone gave it to me to deal with the hard drive or securely erase the machine and let me keep the computer and I did so to ensure the data gets securely removed. I'm perfectly comfortable cutting a hole in a machine like this with how I get them as it will functionally improve access as well but it's not going to be pretty as there will be a obvious wire hanging from the unit forever after I had my way with the unit.
As far as cutting if needed, you'll want to cut here:
Put a piece of painters tape on the inside, and then line up another piece on the back cover, that's how you can quickly find where to cut. It looks like a minor, nearly invisible approach will do.