The hanger must be maintained in a balanced position.
The sum of values on the left hand side of the hanger must be equal to the sum of values on the right hand side of the hanger.
Thus,
x+1+1=1+1+1+1+1
x+2=5
x=5-2
x=3.
Hence, the value of x is 3