I think you need to try and be a bit clearer about the sequence of events. Is the following correct?
1. You fitted a new hard drive to your laptop.
2. You attempted to install Windows XP on the drive, but you received an error message, reporting a RAM problem.
3. You installed new memory module(s).
Now, when you try to boot, the machine runs for about 5 seconds and then switches itself off.
If all that is a correct interpretation, it would help people to help you if you could accurately report:
* How did you attempt to install Windows XP?
* At what point in the installation process did you get the RAM-related error report?
* What the RAM-related error report say?
* Exactly what specification of memory modules have you installed?
* How far into a boot-up does the machine get before it closes down? Do you get any POST beep? What do you see on the screen?