Answer:
In the rigid container : pressure increases when temperature increases and density remains constant
In the flexible container: pressure remains constant and density decreases when temperature increases
Step-by-step explanation:
Using the Ideal gas law

P= absolute pressure, V=volume , n= number of moles (mass) , R=constant , T= absolute temperature
And

D= Density , m = mass , V= volume
In both containers, since they are sealed, the mass is kept inside and remains constant --> n= constant and m= constant
- In the rigid container , V = constant , therefore

And thus absolute pressure increases with absolute temperature
Regarding density

Thus density remains constant
- In the flexible container , P = constant , therefore

but also

And thus density decreases with temperature