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) * 10 + 160 * 4 = 140 * 6 + (140 + 180) * 10.
==> (? + 160) * 10 + 640 = 4040.
==> (? + 160) * 10 = 4040 - 640.
==> (? + 160) = 3400 / 10.
==> ? + 160 = 340.
==> ? = 340 - 160.
==> ? = 180.