If you put the drive from machine (A) into another machine (
you can use the regedit on machine (
to access the hive files
Simply run Regedit select the HKLM key and from the "file" menu you should see an option to load hive.
Browse to the desired hive on the hard-drive you connected (ensure that you have access to where the hives are stored, for XP it will be in the "windows\system32\config" directory, I'd suggest ensuring you have the necessary backups and backup each hive you intend on editing.
That should get you started, good luck in tracking down the fault.
Just to clarify this problem is preventing you from logging on to your machine right? Otherwise this is a heck of a way to go about fixing this problem.
Get your facts first, then you can distort them as you please.