So long as the following condition is met:
- The installed OS is newer than the minimum required operating system for the newest computer. You may need to run Software Update. For example the latest MacBook Pro can run 10.5.8 but can not run say 10.4.11 or 10.5.3. There's a chance it might but you're asking for trouble.
You can swap the hard drives with no issue. The advantage with Apple is that the operating system contains all the drivers necessary for any computer (for Apple provided hardware) that can run that particular version of Mac OS X. (eg. Mac OS X 10.6 will run on any Intel Mac - regardless of which one you're using to start up that drive).
If the MacBook has Firewire you can do a swap by using an external hard drive (at least 160GB in size that can be erased or you're comfortable using disk images and the drive is not formatted FAT32) using a program such as Carbon Copy Cloner or SuperDuper
- Clone Computer A to the external hard drive
- Hook up Computer A to Computer B (host) via FireWire Target Disk Mode
- Clone Computer B onto Computer A's hard drive.
- Hooking Computer B up to Computer A (host) via FireWire Target Disk Mode, then clone the external hard drive onto Computer B's hard drive.
The easiest conceptual option is to swap the hard drives physically, however the hard drive in the MacBook Pro is much harder to reach and not recommended for end users by Apple though if you're good with a screwdriver not that difficult.