The correct option is A 10cm
Magnetic field at an axial point
Baxial=μ04π2Md(d2−l2)2
wherer M is the magnetic moment, d is the distance of the point from center of the magnet and 2l is the length of the magnet.
Substituting the values provided,
B1B2=d1d2d22−l2(d21−l2)2
⇒12.51=1020×(202−l2102−l2)2
⇒5×(102−l2)=(202−l2)
⇒l=5
⇒2l=10