The rule that is used to get the strength of magnetic field at the center of solenoid (B) is:
B = µ x n x I where:
µ is the permeability of the medium where the solenoid is based. In this problem, the medium is air which means that µ = µ o = 4 pi x 10^-7 Tm/A
I is the current passing (I = 4 amperes)
n is the number of turns per unit length (5000 turns)
Substituting in the mentioned equation, we find that:
B = 4 x 3.14 x 10^-7 x 5000 x 4 = 25.132 mT