The purpose of a pulley is to reduce the force necessary to move the object at the other end. You should be able to see that when the block on the left changes position by distance x, the block on the right will change position by distance x/2. So the pulley allows a trade-off - less force required to change the position of the block on the right, at the cost of having to pull the left block a greater distance. This has to happen to conserve energy. If we pull the block on the right upwards 1m and it weighs 1kg, then we increased the potential energy by 10J (work = force*distance). We can apply this equation to the block on the left as well, but since we are using a pulley, distance is doubled and force is halved to ensure the same amount of work is done on each side. If the blocks were connected without pulleys, then the tension in the line would simply be equal to mass*gravity because neither block would be moving. Since the right block has 2 ropes on the top, each of these ropes has an upwards force equal to the tension, leading the upwards force on the right block to be 2T. This overcomes the force due to gravity on the right block and therefore causes both blocks to move. Since both blocks are moving we need to include mass*acceleration for each. Since the above explanation requires the left block to move twice as far as the right block, the acceleration of the left block must have twice the acceleration of the right block.
Therefore:
The equation for the block on the left is: m2a = mg - T (mg is the downward force, tension being upwards force subtracts from this force, we are left with the downward force (m2a) that represents what will be making the block move down)
The equation for the block on the right is: ma = 2T - mg (tension is the upward force, mg is the downward force that subtracts from this force, we are left with an upward force that represents what will make the right block move up)
Rearrange one of the equations for acceleration, plug that in for the other equation, and solve for T.
Book answer is correct.