The overall length of the string doesn't change. He denoted it as K + 2x + 2y + z = L
The system conserves the energy. Can all three objects move on the same direction at the same time? That's why, accelerations of three objects add up to zero.
But why is it not x + y + z = 0 instead of 2x + 2y + z = 0?
Note that the two pulleys which has accelerations x and y has TWO forces acting on each one of them, unlike on the attached mass. And guess who are directly proportional to each other? Force and acceleration.
The key point to solve the problem without Calculus is finding that the change of the length of each string segment per unit time squared is related to the acceleration.
Hope that you've solved your problem.
Extra tip : He derived his function twice with respect to the time. Why? Because it was initially a function of changing lengths (changing displacements) and he wanted to make it to a function of accelerations. Think of it as finding acceleration by distance/(time2)
Then, why did L became zero?
Obviously, L doesn't change as it is a constant. Anywhere the pulleys moves doesn't really matter to L..
Same goes with K. K doesn't change with time.
In calculus, we call that a derivative of a constant, which equals to zero.