400 hp 5.2l vs 5.9l Magnums

How about the same stroke engine then. You covered different strokes. B Engine 3.38 and a 361 bore vs 400 bore.

Your very grey.
Say we're talking 400 hp to compare with it takes a certain amount of fuel and air within a somewhat narrow range be for simplicity sake say it's fixed 550 cfm of air and lets say the engine is 100% ve at peak power. Then engines different displacements is fix to what rpm it would have to turn to displace 550 cfm of air.

So cid x rpm / 3456 = cfm or for our purpose cfm x 3456 / cid = rpm

550 cfm x 3456 / 361 = 5265 rpm so it would 5265 rpm to displace 550 cfm and 4752 rpm for the 400 to do so, Now obviously there's ton's of variables but generally the more efficient the less rpm will be needed and the more inefficient engine will need more rpm. A highly efficient 361 making say 1.45 lbs-ft per cid and a terribly inefficient 400 making 1.1 lbs-ft per cid but both making same peak hp which is probably impossible with those lbs-ft:cid but if so the 361 would spin lower and make more torque than the 400.