Magnetic field due to long solenoid along its axis is given as,
B=μ0nI, where n is the number of turns in the solenoid per unit length, I is current in the solenoid and μ0 is a constant called the permeability of free space.
⇒B2B1=n2I2n1I1
According to the question, n2=2n1andI2=2I1
⇒B2B=(2n1)n1×2I1I1⇒B2=B; means, the magnetic field remains the same.