Changing the direction of current in the wire, we can change the normal reaction on the wire by the surface.
In one case, magnetic force on the wire will be in upward direction while in the other case, it will be in the downward direction.
Hence, normal reaction, N=mg±Bil.
f(friction limiting)=μ(mg±Bil)
As F1>F2
F1=μ(mg+Bil) (i)
F2=μ(mg−Bil) (ii)
From equations (i) and (ii),
F1F2=mg+Bilmg−Bil
mg=Bil[F1+F2F1−F2] (iii)
From equations (i) and (iii), we get μ=F1−F22Bil