Wire library has no complete multi-master support (as I remember). You can join the bus as slave and becoming master by using the master functions for the time of these transmissions (on execution of
endTransmission() the master style I2C transmission is started. When it's finished the library will change to slave again). But you will run into problems, when the two masters send at the same time.
The I2C protocol incorporates a technique named bus arbitration. When two masters write to the bus at the same time, the first one to write a
1 on the bus, must retreat from transmission and become slave again. Unfortunately it seems, that the
Wire library doesn't implement this.
So you might not run into problems, until the master are sending simultaneously. Depending on what the Arduinos also have to do, you may be able to recover from such a condition by using the Watchdog Timer to reset both masters, when they are stuck there.
Or you try to find a good I2C/TwoWire library, that works for Arduino and has Bus arbitration implemented.
Sidenote: 20m is quite a long distance for I2C. It is designed for short distances, mostly on the same PCB (hence it is called Inter Integrated Circuit, short IIC or I2C). You may not run into issues, but you should keep this in mind. The bus will have a greater capacitance and you may need strong pullup resistors.