apply plumbing cement on p-trap
You do not use cement or any sealant on the threads of a p-trap. It would not do any good and would bond the threads and so prevent adjustment. The purpose of the threads in these drain elements is to compress the joint. The seal is made by rubber or plastic ring seals or the faces of the two parts of the p-trap.