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.
(160 + 100) * ? + 100 * 8 = 180 * 4 + (180 + 100) * 4.
==> 260 * ? + 800 = 1840.
==> 260 * ? = 1840 - 800.
==> ? = 1040 / 260.
==> ? = 4.