(a) As is clear from the condition, Ampere's forces on the sides (2) and (4) are equal in magnitude but opposite in direction. Hence the net effective force on the frame is the resultant of the forces, experienced by the sides (1) and (3).
Now, the Ampere force on (1),
So, the resultant force on the frame = F1 - F3 , (as they are opposite in nature.)
(b) Work done in turning the frame through some angle, where Φf is the flux through the frame in final position, and Φi that in the the initial position.