The methoxy group affects very little the basicity of aniline when placed in ortho or meta. However, in para position, the farthest one, it increases aniline's basicity in almost an order of magnitude. The explanation is in this case a bit complex.

An alkoxy group exerts two opposite effects. One due to the oxygen's electronegativity (electron acceptor) which is very sensitive to distance and severely decreases with it. The second, due to resonance where the oxygen is able to donate electrons because it is forbidden for it to get more than eight electrons. This effect is almost insensitive to distance, provided there is a net of conjugated bonds to transmit it.

The basicity increase exerted by the OMe group in para position can be understood in terms of electron density concentration over the nitrogen due to the electron donor effect by resonance of the OMe group, even though it is at the para remote position which precisely prevents the oxygen to show its electronegativity effect.




In the ortho position, the oxygen is very close to the nitrogen and both donor (resonance) and acceptor (electronegativity) effects cancel leaving the basicity almost unchanged relative to aniline.

However, in the meta position still close enough to the nitrogen, the electronegativity effect is possible but at that precise position resonance cannot work. Those facts explain why the basicity decreases in meta-methoxyaniline relative to aniline in 0.4 units.