This is not going to be a simple project. I suggest you think, first, about using the two motors the way you describe both connected to the same Arduino board. (I will mention the communication between Arduinos in a moment).
In many ways the easiest motors to use would be stepper motors - but they would also need encoders. Reading the encoder on one motor could be used to send the number of steps to the other motor. Even with this arrangement there are complications. Unless you use absolute encoders you will not know where the motor actually is. If the “master” motor is powered up you may not be able to turn it by hand. If it is not powered up it may not hold position.
You could use DC motors with encoders but the software to position them accurately will be much more complicated.
Even if you sort out those issues, when you put the motors on two separate Arduinos you will add in the complications from the time it takes for data to pass from one to the other.
Have you considered using a potentiometer to identify the position which is then sent to both motors? In that case maybe you could use servos which are by far the easiest positionable motors to work with.