What is wrong with considering the Atwood machine as a system? I am confused about a method used in the following problem. There is an arrangement as shown below. The surface is smooth, and the pulleys are light. We have to find the acceleration $a_0$ of $m_1$.

The method I used to solve it was to consider the pulley B and masses $m_2$ and $m_3$ as a single system that goes down with the same acceleration as that of $m_1$. If this acceleration be $a_0$, then the equations of motion give $$a_0=\frac {m_2+m_3}{m_1+m_2+m_3}g$$
However, the textbook solution treats motions of all objects individually, where $m_1$ has an acceleration $a_0$, $m_2$ has an acceleration $a_0-a$ and $m_3$ has an acceleration $a_0+a$, all from the lab frame(inertial). The answer calculated thus does not match with mine. The texbook gives $$a_0=\frac {g}{1+ \frac {m_1(m_2+m_3)}{4m_2m_3}}$$
The question is, what is the problem with considering the pulley B and the masses $m_2$ and $m_3$ as a single system of mass $(m_2+m_3)$? Or do we have to take some precautions, when the system is accelerated? (The textbook solution is perfectly alright and I understood it too, but what is the problem with mine?)
 A: The vertically moving object is an Atwood machine and the two masses have their own accelerations that are in different directions. The acceleration of $m_2$ and $m_3$ (separate from the total system) is given by
$$
a=\frac{m_3-m_2}{m_2+m_3}g\tag{1}
$$
Mass $m_2$ is accelerating upwards, hence the acceleration in your case of $a_0-a$; likewise mass $m_3$ is accelerating downwards with an acceleration of $a_0+a$. 
Newton's 2nd law says that the sum of the forces is equal to $ma$, so you should be using all the forces in the set up.
A: The problem in yours is that you are taking the net force acting downward to be $(m_2+m_3)g$ is incorrect and that led you to take the total mass to be $m_1+m_2+m_3$ which is again incorrect because $m_2\neq m_3$. If $m_2=m_3$ then the center of mass of $m_2$ and $m_3$ will lie on the straight vertical line through the center of the pulley B and the force would act exactly at the center of the pulley B but $m_2\neq m_3$ so the center of mass will shift so at the center of the pulley B the effective mass, $m$, due to which the net force is acting downward is to be found out.   
The net force acting is the two tension in the string where the masses $m_2$ and $m_3$ are suspended. From free body diagram of $m_2$ and $m_3$ tension $T$ can be found out and net force acting on pulley B will be $2T$.$$F_{net}=2T=4m_2m_3g/(m_2+m_3)$$ $F_{net}/g=m$ where $m=4m_2m_3/(m_2+m_3)$ is the effective mass of $m_2$ and $m_3$ with pulley B 
So the new problem consists of two masses $m_1$ and $m$ with pulley A, $m$ replacing $m_2$ and $m_3$.
$F_{net}=mg$ and the total mass now is $M=m_1+m$ and $$a_0=F_{net}/M$$
