Today, dollar for dollar, is the 318 faster than the 340 ???

Just because a head will support a determined horsepower doesn't make it so.
There are other variables needed to produce a number.
It would be nice if you included the other components that would result to a 400 HP 5.2 magnum.
I'm not saying it can't be done, but I believe the $ 3000 budget is the limiting factor.

Well we know the heads 750 airgap set of headers are capable of 400 hp, which leaves cr and cam, so I guess question how much cam and cr you would need to get to 400 hp out of a 5.2l, the 5.9l crate only needs 9:1 cr and a 230 .500" 108 cam can't see a 318 needing all that much more.