How to solve the pulley problems (hanging from the ceiling)
Pulley problems (also called Atwood machine) are the favorite problems to the professors and students seem to really struggle with it. There are several ways to solve it and some of them are too complicated to understand. But here I will try to explain a general and easier way to approach the problem.
Case I: Massless pulley
Simple Pulley (Atwood machine)Suppose a string is placed over a massless and frictionless pulley. A block with mass

Say
Solution:
From Newton's law we can write-
Right? And then we can rewrite it as-
Awesome, it wasn't that hard. Only things we need to figure our is the
Now consider the mass
What about the mass
Now since
Great we have found both
Now what if the professor asks you to calculate the Tensions on the strings?
You can start from the scratch and derive the whole formula but during the exam it would take a lot of time. The easiest way is to remember these two equations-
In our case
And
Solve for
Case- II: System with Two Pulleys (Atwood machine)
Now, consider a little bit harder problem, you have two pulleys and they are in equilibrium. What is the tension force at each section of the rope?Solution:

From the figure it is clear that
Now look closely both
What about
And Boom! you have all the tension forces.
Case III: System with Two pulleys with weight at the End
Okay, let's add another weight to the system and consider
Solution:
Like the first example we can use the Newton's law but we have two pulleys now. So let's apply
Now consider the block
But wait,
Now on equation (A) using
Case- IV: Pulley with weight:
Till now we have only consider that the pulley itself is massless. Just for fun, let's say we have the same configuration as example 1 but this time pulley has some mass
We know for a rotational object acceleration is-
And as the previous examples using Newton's law for
And for
Since this time our pulley has the mass, we need to consider the net force acting on the pulley too. Using the laws of rotational motion, we can write-
Adding all the above equation we can solve for
And that's your equation for acceleration for the massive pulley system.
Does the above example make sense? Let's check. It's your turn now. Say you have four pulleys and as before

Now calculate the acceleration and the tension force for this system for these cases
1) What if the pulleys has no mass?
2) What happens if you consider that the pulleys have some masses?
Let me know in the comments.
See also: Pulley on inclined plane