For L1: Since PϵL(M) means any string from P, Does it belong to L(M) ?
now there arises two cases,if there is a string which is accepted by M , it will say YES .
If not, then it wud halt or fall into infinite loop ,we cant say.. therefore L1 is RE.
For L2: (Its more easy) Since P is a Halting TM (as given halts on all input),
it is always decidable that a string from M belongs to P or not . It can say YES or NO. (as it halts on every input).
therefore, L2 is REC.