The key is the perimeter formula for a circle (the earth equator is a circle)
where r is the earth's radius. Setting Pi=3.14:
p = 6.28*r
Since the perimeter is 25500, and we need a final result in inches, we'll convert it multiplying by 5280 and then by 12 (1 mile =5 280 feet and 1 feet = 12 inches)
So 25500 miles= 25500x 5280 x 12=1615680000 inches
Now we get earth's radius:
r=p/6.28=1615680000/6.28=257273885.350... inches. (ra)
If we add to the 25500 miles (1615680000 inches) 21 feet (that's 21x12=252 inches), we get 1615680252 inches as new perimeter.
With this data, new radius is:
r=p/6.28=1615680252/6.28=257273925.477... inches. (rb)
The difference (rb)-(ra) is the gap:
257273925.477707 -257273885.35031846 = 40.127388536930084, rounded to 40 inches.
Notice that we could have gotten this result in an easier way:
since we are calculating only the difference between radius a (ra) and radius b (rb)
diff=rb-ra=pb/Pi -pa/Pi = (pb-pa)/Pi,
where pa is the earth's perimeter (distance around equator) and pb is the incremented perimeter. But pb-pa=21 x12=252 inches, so diff= 252/Pi =40.12738853503184! which is the same result we got. So it didn't depend on the diameters, but only on the gap!