The three rules of the language are:
The letters P and Q are sentences. If φ and ψ are sentences, then Nφ and (Iφψ) are sentences. Nothing else is a sentence.
(no more information was given about the language)
It then asks whether '(I(IPP)P)' is a sentence, and whether 'N(INNPNNQ)' is a sentence. I'm unsure how to unsure the first questions, due to my wondering whether 'IP' counts as a valid sentence (could the 'ψ' in the (Iφψ) rule be empty?), and whether, although '(IP)' and '(IPP)' may be legitimate sentences, whether putting (IPP) in the middle of (IP) is allowed. I'm guessing not, but I want to make sure. I also think the last one is a sentence too, but I'm not sure, and any help on how to grasp this sort of question would be much appreciated. Thanks!
Let me call $N\varphi$ rule 1 and $(I\varphi \psi)$ rule 2.
We know that $P$ is a sentence. Then, by rule 2 with $\varphi = P$ and $\psi = P$, we have that $(IPP)$ is a sentence. Then we can use rule 2 again with $\varphi = (IPP)$ and $\psi = P$ to obtain $(I(IPP)P)$, so this is a sentence. Can you do the second one from there?