Here's what I think happened (assuming there are no other hardware problems with your friends laptop)...
You replaced a motherboard with one that was not exactly the same as the last. When Windows booted, it probably froze on you because it was trying to load drivers for something on your motherboard that changed when you installed the new motherboard (perhaps a slightly different chipset, perhaps graphics, could be anything).
Now that you reinstalled Windows, you get an error.
What you should do is write down this exact error, and then post it here. I have seen errors that say something like, "missing component somefilename.ext missing or not correctly registered". If that's the case, the problem might be easy to fix. But it's hard to diagnose without the exact error.