The only way to be sure is to calculate the power draw of both the amp and the inverter. Max load of both would be 400 + 400 watts = 800 watts.
Watts = Volts * Amps, so 800 = 12 * A. Amps = 66 amps, or 33 amps on each 4 gauge wire. The 12 volt.com says you can get away with a wire run of up to 12 feet at that amperage for 4 gauge.
The actual max load is probably less since when the car is runnng it outputs closer to 14 volts.