First let's find the tension generated by the mass of 15 kg.
We can use the following formula to find this tension component:
Now, to find the tension generated by the beam, first let's find the angle from the connection point of the rope with the wall and the center of gravity of the beam:
Now, let's use the same formula we used in the beggining:
Adding both tensions, we have: