When the forces are perpendicular to the arm as shown in your diagram then the work done is simply
Where $Fr$ is the torque and $r$ is the distance from the hinge to the point of application of the force $F$.
Although the displacement angle θ is the same for the forces at both A and B, The distance that the force at B travels along the arc is greater than the distance that the the force at A has to travel for the same angle displacement θ. For this reason when the forces are the same, the force at B does more work than that at A.
If the torque at A and B is the same, the forces at A and B do the same work, but less force is needed at B than A to do the same work because of the longer moment arm, $r$. The advantage of applying the same torque at B is it requires less force (effort) to do the same work, providing a mechanical advantage like a lever. Of course the force has to be applied over a greater arc length. Nothings for free.
Hope this helps.