I just found here(https://byjus.com/physics/relation-between-density-and-temperature/#:~:text=Density and Temperature Relationship 1 When density increases,,reduces. 4 When the temperature decrease, density increases.) that P=##rho##RT. So they just took ##\rho=\frac{n}{V}##...