Before doing any calculation, try to predict what you expect to happen to the density of a gas if pressure is increased while temperature is kept constant.
As you know, density is defined as the mass per unit of volume. Since the mass of the gas is also kept constant, the only way to change its density is to change the volume it occupies.
Now, what happens to the volume of an ideal gas when pressure is increased at constant temperature and number of moles?
You should remember from Boyle's Law that pressure and volume have an inverse relationship when temperature and number of moles of gas are kept constant.
What that tells you is that increasing the pressure of the gas will cause its volume to decrease. Likewise, decreasing the pressure of the gas will cause its volume to increase.
So right from the start you can say that since the pressure of the gas is increased, the volume will decrease, which in turn will cause the density of the gas to increase, since now you have the same mass of gas in a smaller volume.
If you start with
#color(blue)(P_1 * V_1 = P_2 * V_2) ->#the equation tha describes Boyle's Law
In your case, the pressure is doubled, so you can say that
#P_2 = 2 * P_1#
Plug this into the equation and solve for
#V_2 = P_1/P_2 * V_1#
#color(purple)(V_2) = color(red)(cancel(color(black)(P_1)))/(2color(red)(cancel(color(black)(P_1)))) * V_1 = color(purple)( 1/2 * V_1)#
The density of the gas at the initial state was
#rho_1 = m/V_1" "#, where
The density of the gas at the final state will be
#rho_2 = m/color(purple)(V_2) = m * 1/(color(purple)(1/2 * V_1)) = 2 * overbrace(m/V_1)^(color(red)(=rho_1))#
#rho_2 = color(green)(2 * rho_1)#
So, you can now say that doubling the pressure of the gas will halve its volume, which in turn will double its density.