Connect the camera to a computer using the USB cable. If it allows you to get past the point where it has been freezing, then the lack of motion of the lens is the likely cause. Stop here and let me know and we can proceed in that direction.
If it still freezes after the setup, the internal memory is corrupted or damaged and maqin circuit board work is necessary to repair it. The factory authorized repair service at the link below is to my knowledge the best option for this type of repair. You can also get an online estimate for the repair. (Also see note)
Considering the age and present value of this camera, paying the cost of having it repaired , approximately $97 - $110 really depends on how attached to the camera you are. The standard "rule of thumb" is if the repair cost is greater than 50% of the value of the camera, it is not worth it. A good used or refurbished DSC HX5V can be purchased for as low as $22 - $50 and I've seen a brand new one for around $92.
Please keep in mind that my diagnosis & solutions provided are directly dependent on the accuracy of your description of the problem. As with any "do it yourself" fixes, success is a "team effort", since I can't see or touch the camera, and relies on the customer's manual dexterity and ability to follow the instructions well.
If you require additional information, please use the Reply to Expert Tab to contact me. Click the ratings only after our exchange is complete and you are satisfied.
If you are satisfied that my answer is accurate, or has provided a reasonable alternative solution please do not forget to rate my answer OK, Good or Excellent.