Difference 5.2 or 5.9

Going to look at a 2001 Ram for a project. They don’t know what engine. I don’t want to get taken not knowing what I’m looking at. Thanks

Look at the stickers under the hood to see what spark plugs for what engine it shows on the sticker. That's the easiest way to tell, if the engine has not been changed out