If you want to find out which version of Mac OS X is installed on a drive, but cannot boot into it, there is a plist file that holds the version number.
The file can be found at:
Macintosh HD > System > Library > CoreServices > SystemVersion.plist
The SystemVersion.plist file should look a bit like the picture below. I have outlined the relevant part in red:
Alternatively you could paste the following command into terminal:
defaults read defaults read /System/Library/CoreServices/SystemVersion.plist | grep "ProductVersion"
This will show you the version of the currently booted system. You would need to change the first bit if you wanted to find out from another mounted drive.
The output will be:
ProductVersion = "10.7.2";
In my limited testing, this seems to have an error when run from 10.5. It says the file doesn’t exist. I will look into this some more.