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 + 160) * 4 + 160 * 8 = 140 * ? + (140 + 100) * 8.
==> 2480 = 140 * ? + 1920.
==> 2480 - 1920 = 140 * ?.
==> ? = 560 / 140.
==> ? = 4.