It's best to put the inverter as close to the batteries as you can, but not in the same compartment due to battery gasses. Then run the 120 volt output to where you need it.
The 12 volt side needs thick, short wires between the inverter and the batteries to minimize voltage loss. First, you're drawing 10 times as much current through the 12 volt wires so they have to be 10 times larger than 120 volt wires carrying the same amount of power.
Next, voltage loss is directly proportional to the length of the wire and at 12 volts you only have 1/10th as much voltage to start with, so each 0.1 volt of voltage loss is 10 times more significant than it is at 120 volts. 10x as much current with 1/10th as much source voltage makes the 12 volt wiring 100 times more vulnerable to wire loss than the 120 volt side.
That's why it's best to position the inverter where you can use the minimum length of 12 volt wiring between the inverter and the batteries, then extend the 120 volt wiring to where you need it.
It's the same principle why power companies use as high of a voltage as possible on their long distance power lines.