Here you see that weights A and B are connected by a parallelogram that has equal arms. When B descends by a distance, A rises by the same distance, and thus the weights move equal distances.
Interestingly, the weights balance regardless of position on the arms. This is a useful property for a balance. When the weights are positioned at different positions along the arms, the difference in torque produces compression and tension within the horizontal members of the parallelogram but no net torque around the pivot points.