This is what I thought:
First find torque as a function of theta , for both then use Tau= Ialpha , and find theta as function of time , and then we can find the relation between their respective angle of rotation for same time t, and then find potential energy using M•B as a function of theta ( for smaller loop )which is being used as Rotational ke, and maximise it
Very tough and tiring
@Viraj don't tell the answer until I tell