The force acting on the loops due to magnetic fieldBis given as
F=iBl
For loop(P)the length is b
Hence the force is given as
F=I1Bb
Similarly the force for the second coil is given as
F=I2Bl
By equating these two equation we can find the ratio of the currents
I1Bb=I2Bl
I1I2=lb