To make 400 hp with a 289 you will need at least 10 to 1 compression and peak power at about 7800 rpm. To do this would take race quality engine parts (meaning all forged internals, race prepped after market heads, roller cam, etc. Two big problems with such an engine, will be almost impossible to drive on the street, but bigger problem is the 289 block will not last long turning the rpm needed to produce 400 hp.
Also due to short cylinder bore (the cylinder bores do not reach down into the block far enough to support the pistons when stroked), a 289 is not a good block to stroke.
You may want to consider a 302 crate engine stroked to 331 or 347. With good heads, cam, intake, and headers many crate engines are close to 400 hp.
Google crate engine. There are many companies that sell them.