The Nikon CoolPix B500 is a current model, perhaps a known issue with this model. I would recommend a warranty repair, chances are Nikon will ship you a new camera as it's less expense for Nikon at times than an actual repair.
As the Sony Cyber-shot DSC-W510 is now 7 years old, personally, I would opt for an aftermarket battery on Ebay that can be found for $10.- $15. An original Sony battery will most likely cost more than the current dollar value of the camera.
Your best bet is to nail down the CCD Sensor model #, chances are Kodak may have manufactured it. Kodak & Nikon have become once again independent in the Digital Replaceable Cameras Age since they are finally making $$$$$ once again. You will be lucky if they answer your emails, although if you know exactly which CCD Sensor it is the odds could be better than average that you could pick up a cracked point & shoot camera for $10.00 with the exact same CCD Sensor in mint condition in the camera. You need to do the research on the specs of your Sensor & find out which other Digital Cameras have the same one. Just another avenue to take, hopefully this helps you, Good luck.