First, Calcium hydroxide Ca(OH)2 does not consist of molecules.....this is an ionic compound between calcium and the hydroxide ion! The word /designation molecules should be used for covalent compounds but some times it is used loosely!
Presuming they meant this is the case here, we are using the information that all chemistry students should know:
1 mol of _______ = 6.02 x1023 particles [ definition of Avogadro's number; 6.02 to 3 sig. fig.]
therefore, one mole of Ca(OH)2 has 6.02 x1023 formula units "molecules" of the compound.
We use the definition of Avogadro's number as a relationship/ratio in the way that it will provide the answer asked.
2.31 mol Ca(OH)2 x [6.02 x1023particles /1 mol Ca(OH)2] = 1.39 x 1024 molecules [formula units]