In my textbook there is a case given that is to find acceleration and tension produced in a string passed over a frictionless pulley and attached with bodies of different masses at its ends. Now below I am showing you some of the derivation given in my textbook and then in last I will tell what my question exactly is.
Derivation:
(In diagram, the mass at right is $m_1$ and at left is $m_2$)
Let $m_1>m_2$ then body at right will accelerate down with acceleration $a$ and body at left will move up with same acceleration.
The net force acting on body at right is given by, $m_1g$ $-$ $T$ (since $W_1$ $>$ $T$) and the net force acting on the body at left is given by, $T$ $-$ $m_2g$ (since $T$ $>$ $m_2g$).
Now come to my question. We know that,
$a=\frac{Net-Force}{m}$
Acceleration for body at right is given by,
$a=\frac{m_1g-T}{m_1}$
Acceleration for body at left is given by,
$a=\frac{T-m_2g}{m_2}$
Since it is said that acceleration produced in both bodies is same then,
$\frac{m_1g-T}{m_1}$ $=$ $\frac{T-m_2g}{m_2}$ but it is written that,
$m_1>m_2$ and therefore,
$\frac{m_1g-T}{m_1}\neq \frac{T-m_2g}{m_2}$
I ask that Can two bodies move with equal magnitude of acceleration if forces acting on both are unequal? If not then is that all given in my textbook is wrong? If yes then how?