The magnetic field at some internal point on the axis of a solenoid is given by B=2μ0nI(cosθ1−cosθ2)
Magnetic field at the centre of a long solenoid is given by setting θ1=0∘ and θ2=π. ⇒B1=2μ0nI(cos0∘−cosπ) =2μ0nI[1−(−1)] =μ0nI...(i)
Similarly, the magnetic field at the end of a long solenoid is given by setting θ1=2π and θ2=τ ⇒B2=2μ0nI(cos2π−cosπ) =2μ0nI[0−(−1)] =2μ0nI...(ii)
From Eq. (i) and Eq. (ii), we get B2B1=μ0nIμ0nI×2=2