Step 1: Magnetic field inside a solenoid.
The magnetic field inside a long solenoid is given by:
\[
B = \mu_0 n I
\]
where \( \mu_0 \) is the permeability of free space, \( n \) is the number of turns per unit length, and \( I \) is the current.
Step 2: Magnetic field outside a solenoid.
The magnetic field outside a solenoid decreases with distance from the solenoid. The ratio of the magnetic field at a point on the axis of the solenoid to a point \( r/2 \) from the axis is proportional to the inverse of the distance. Thus, the ratio is \( 4 \).
Step 3: Conclusion.
The ratio of the magnetic fields is 4.