I get the idea that you have borrowed this camera from someone and are concerned about returning it to them broken. Your question may be less about how to fix the camera than how to save a relationship.
I checked and it looks like the A510 is no longer being sold. Believe me, whoever owns this camera would probably not want another 3.2 mp digital anyway, but I'll bet you can find an exact replacement, for cheap, on e-bay. Another option would be to buy a comparable new camera for the owner. I see that the Canon A520 looks about the same, costs around $150, and moves the owner up to 5 mp. However, I think you only owe the owner the value of his/her camera, which is what they are selling for on e-bay.
Another consideration is that cameras do fail on their own and nothing lasts forever. I lent a chainsaw to a friend once and he returned it saying it quit working while he was using it. It worked for him initially, then it broke. He never offered to help replace it, he just assumed that it would have broken whether he was using it or whether I was using it. He could have been right, but I resented the fact that he didn't offer something for returning my property broken. Would I have taken anything from him in this case? NO. But the gesture would have made our friendship stronger. As it was, I always felt less close, less comfortable with my friend and I would have been very reluctant to ever loan him anything again. Unfortunately, he has passed away and our relationship is now over.
You can save the relationship. Be honest, be sorry, take responsibility.