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 + ?) * 6 + ? * 4 = 160 * 10 + (160 + 160) * 2.
==> (140 + ?) * 6 + ? * 4 = 2240.
==> Write without parentheses: 140 * 6 + ? * 6 + ? * 4 = 2240.
==> Simplify: ? * 10 + 840 = 2240.
==> ? * 10 = 2240 - 840.
==> ? = 1400 / 10.
==> ? = 140