How do I tell a 5.2 from a 5.9

Made a trip to the Pick and Pull yard today, looking for a part for my wife's Nissan Sentra,

While I was there I started checking Durango's, Dakota's, and Grand Cherokee's to see if they had any 5.9 magnums. Thinking of doing the magnum swap in my Dart.
I found several magnums, but I quickly realized that I had no idea how to tell a 5.2 from a 5.9

Any help ? Where do I look for numbers, and what numbers am I looking for ?

Also, is there any reason not to pull one from a Grand Cherokee as opposed to a Durango, Ram, or Dakota?