Reinstalling XP shouldn't affect your programs, as long as you don't choose to format any partitions. It should recognise your existing installation.
Do you say that if the computer is off, when you turn it on again it will start up normally - it only hangs after a power cut? How long have you left it for - Windows performs a disk check after an unscheduled reboot which may take some time for a large disk on a slow computer... if the several hours you say is true, then there is something wrong