Notes:
(i) Weight acts at the center of the ruler, at 50 cm.
(ii) Weight and the 2 N force are right of the pivot and point down, so they both turn the ruler in the clockwise direction. Only the 4 N force turns the ruler anticlockwise.
Also, the d in the formula is the distance between the force and the pivot, so that's 25 cm.
(iii) Do a moment balance. The weight is 50 - 35 = 15 cm from the pivot and the 2 N force is 80 - 35 = 45 cm away.
(iv) Let d be the distance between the pivot and the weight in m. Then (0.4 - d) must be the distance between the 4 N force and the pivot. (The 0.4 comes from the weight and 4 N being 0.4 m apart)
Do another moment balance
clockwise = anticlockwise(0.67 N)d = (4 N)(0.4 - d)d = 0.34 m = 34 cm
Since d is the distance between the pivot and the weight, 50 cm - 34 cm = 16 cm should be the new location of the pivot.