2. Whenever $(a,b)=1$ we have $\phi(ab)=\phi(a)\phi(b)$. So if $p \nmid n$, then $(p,n)=1$ and $\phi(pn)=\phi(p)\phi(n)=(p-1)\phi(n)$.
Conversely suppose $\phi(pn)=(p-1)\phi(n)$; write $n=p^\alpha m,\: p \nmid m$. Then $\phi(n)=\phi(p^\alpha)\phi(m)$ and $\phi(pn)=\phi(p^{\alpha+1})\phi(m)=\frac{\phi(p^{\ alpha+1})}{\phi(p^\alpha)}\phi(n)$. From this and our hypothesis we get $\frac{\phi(p^{\alpha+1})}{\phi(p^\alpha)} = p-1$. But if $\alpha>0$, $\frac{\phi(p^{\alpha+1})}{\phi(p^\alpha)} = \frac{p^{\alpha+1}(1-1/p)}{p^{\alpha}(1-1/p)} = p$, which contradicts $\frac{\phi(p^{\alpha+1})}{\phi(p^\alpha)} = p-1$; hence $\alpha=0$ and $p \nmid n$.