"Volume is directly proportional to temperature" for a ideal gas (pV= nRT). That is NOT true for a liquid. Also, for either, it is true that volume will increase with increasing temperature so it should be clear that density will decrease. Your formula, has positive.
You are told that . Density is defined by where m is the (constant) mass. Differentiate that to get and use that with