The scale is balanced. This is the case if the distances * weights are the same on both sides of the scale: (A + B) * weigth 1 + B * weight 2 = C * weigth 3 + (C + D) * weight 4.
(140 + 180) * 4 + 180 * 2 = 140 * ? + (140 + 120) * 2.
==> 1640 = 140 * ? + 520.
==> 1640 - 520 = 140 * ?.
==> ? = 1120 / 140.
==> ? = 8.