Answer
Since m1 $\gt$ m2, the forces will be different.
Work Step by Step
Since force is acting on different blocks and the acceleration of the system is the same:
In the first case
F12 = m2 a
And inn the second case
F12 = m1 a
Since m1 $\gt$ m2
So the forces are different.