Because the stick is suspended in the middle, the torques due to its mass are in equilibrium sum to zero in the equation, therefore, I shall not include them.

The other torques are #tau_"counterclockwise" and tau_"clockwise#"

#tau_"counterclockwise"# is applied #50" cm"# away from the center and the force is #(3" kg")(-9.8" m/s"^2)#

#tau_"counterclockwise" = (50" cm")(3" kg")(-9.8" m/s"^2)#

#tau_"clockwise"# is applied #30" cm"# away from center and the force is #M(-9.8" m/s"^2)#:

#tau_"clockwise" = (30" cm")M(-9.8" m/s"^2)#

Because the stick in in equilibrium, we may set #tau_"clockwise" = tau_"counterclockwise"#:

#(30" cm")M(-9.8" m/s"^2) = (50" cm")(3" kg")(-9.8" m/s"^2) #

Solve for M

#M = (50" cm")/(30" cm")(3" kg")(-9.8" m/s"^2)/(-9.8" m/s"^2)#

#M = 5" kg"#