The given problem can be exemplified in the following diagram:
The weight of the bar is concentrated in its center of mass which is located in the middle of the longitude of the bar. We can add the total torques at the point where the pivot touches the bar and we get:
![\Sigma T=(5\operatorname{kg})(g)(1.8m)-(2m-1.8m)(Mg)]()
Here we have used momentum counter-clockwise as positive. Since the system is in equilibrium the sum of the torques must be equal to zero:
![(5\operatorname{kg})(g)(1.8m)-(2m-1.8m)(Mg)=0]()
Now we solve the operations, we will use for the acceleration of gravity 9.8 meters per second squared:
![88.2Nm-1.96M=0](https://img.qammunity.org/2023/formulas/physics/high-school/8eli11y386wzrqlhi649oiql2qsw6aucv3.png)
Now we solve for the mass "M" first by subtracting 88.2Nm from both sides:
![-1.96M=-88.2Nm](https://img.qammunity.org/2023/formulas/physics/high-school/xf3wnxv2yrb85v9u5u3jjpm3fa7y39fdq9.png)
Now we divide both sides by -1.96:
![M=(-88.2Nm)/(1.96m(m)/(s^2))](https://img.qammunity.org/2023/formulas/physics/high-school/wu84eq25z9bgq9dgxmhk8emxtbpir6607g.png)
Solving the operations we get:
![M=45\operatorname{kg}]()
Therefore, the mass of the bar is 45 kg.