My problem is I don't know where the 2 and the 4 are coming from. The only thing I can think of is because block 2 is connected to a pulley that is connected to another one you make times m_2_g by two, and because there are 4 objects with tension that makes m_1_a=(T/4), but that doesn't really make sense.
When m2 moves down through a distance x, lengths of the right and left segments of the string increase by x.
Since the total length of the string is constant, the length of the horizontal segment of the string decreases by 2x.
Since the acceleration a = dx/dt, the acceleration of m2 will be a and acceleration of m1 will be 2a.
The tension in each segment of the string is the same.
Now apply the Newton's second law for m1 and m2 and solve for a.