Pulleys are magical contraptions that change the direction of tension. When you have a rope running over a frictionless pulley, the tension is the same everywhere on that rope. It’s like a chain of gossip that reaches every point simultaneously.
If you have two weights hanging on either side of a pulley, the heavier one pulls down harder. The tension then becomes the force that slows down the heavy one and speeds up the light one. You solve it by writing two equations—one for each weight—and realizing the acceleration is the same for both. It’s a detective story with numbers.