The torque is where r is the distance from the hinge to P, F is the magnitude of the force and is the angle between the beam and the force.

In the second problem, you know the initial air volume, pressure (atmospheric plus the excess mercury) and temperature. Using the Ideal gas law, you can find the amount of air. Then, using the new volume, you can find the new pressure.